Closed cameronmcphail closed 7 years ago
@cameronmcphail yes at a glance it looks like some changes will need to be made to the GoogleMap component. Happy to accept a pull request, as I'm not sure how soon I'll have time to look at it.
@cameronmcphail fixed, https://github.com/dburles/meteor-google-maps-react-example
Hi,
I'm having issues when navigating through pages using react-router.
I've followed the React example (very helpful) however I have had issues building it into react-router.
The first time that the page loads, here is what happens in GoogleMap.js:
If I switch routes (without reloading the page), then componentWillUnmount is called. So far this is all expected behaviour.
If I go back to the first page, or navigate to a new page with a GoogleMap.js component, here's what happens:
There's no updating of the props, and no map is displayed. Instead, the render function will only render the string 'Loading!' (passed as a child by the parent element in the React example).
Is it possible get the map to render without refreshing the page?