Created
May 9, 2016 01:20
-
-
Save fdaciuk/4471602a7038d0867c35f93950ff8300 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
import React, { Component } from 'react' | |
class MapComponent extends Component { | |
componentDidMount () { | |
window.initMap = () => { | |
const map = new google.maps.Map(document.getElementById('map'), { | |
center: {lat: -34.397, lng: 150.644}, | |
zoom: 8 | |
}); | |
} | |
initMap() | |
} | |
shouldComponentUpdate () { | |
return false | |
} | |
render () { | |
return <div id='map' style={{ height: '500px' }}>carregando mapa...</div> | |
} | |
} | |
export default MapComponent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment