I have found the only working google map example in React at https://github.com/StephenGrider/ReduxCasts in the weather
project. It can be installed with npm i; npm start
I have https://bitbucket.org/codyc54321/anthony-project-react where the maps do not show an error when you click them, but nothing shows up on page. If you do inspect element and open the body, you do indeed see many divs containing the html of a google map, but nothing is visible. I'm not styling things so I don't know why it would be invisible.
The map is
import React, { Component } from 'react';
class GoogleMap extends Component {
componentDidMount() {
new google.maps.Map(this.refs.map, {
zoom: 12,
center: {
lat: this.props.lat,
lng: this.props.lon
}
});
}
render() {
return <div ref="map" />;
}
}
export default GoogleMap;