React newbie here, please bear with me : ) Hopefully this will be very simple to solve
For the moment, I am simply trying to get the map to appear on screen, but whe
This is an improved version of my previous answer
I've just tested your code, which contains lots of errors, undefined and unused variables! Therefore, you can use the following code instead, which is quite simple (this will let you through the current problem and show the map!)
First, install necessary libraries:
npm install --save google-map-react
npm install --save prop-types
Then, you may copy the whole thing below:
import React, { Component } from 'react';
import GoogleMapReact from 'google-map-react';
const AnyReactComponent = ({ text }) => {text};
class MyClass extends Component {
constructor(props){
super(props);
}
render() {
return (
);
}
}
MyClass.defaultProps = {
center: {lat: 59.95, lng: 30.33},
zoom: 11
};
export default MyClass;