Skip to content

Instantly share code, notes, and snippets.

@tgoldenberg
Created July 2, 2015 18:35
Show Gist options
  • Save tgoldenberg/93fa284ff9a9200e8a0e to your computer and use it in GitHub Desktop.
Save tgoldenberg/93fa284ff9a9200e8a0e to your computer and use it in GitHub Desktop.
// ReactMap.jsx
var GoogleMap = GoogleMapReact.GoogleMap;
var ReactMap = React.createClass({
render: function() {
return (
<div style={{height: 400}}>
<h1>MAP</h1>
<GoogleMap center={[59.938043, 30.337157]} zoom={12}/>
</div>
);
}
});
##application.html.erb
<script src="https://rawgithub.com/istarkov/google-map-react/umd-build/lib/umd/GoogleMapReact.js"></script>
Errors:
Warning: Unknown DOM property class. Did you mean className?
react-1ed468f6634e7db63bce66fc4c2be083.js?body=1:19589 Warning: React.createElement: type should not be null or undefined. It should be a string (for DOM elements) or a ReactClass (for composite components).
react-1ed468f6634e7db63bce66fc4c2be083.js?body=1:19589 Warning: Only functions or strings can be mounted as React components.
Uncaught TypeError: Cannot read property 'context' of null
Uncaught TypeError: Cannot read property 'toUpperCase' of undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment