pieterv / react-googlemaps

A declarative React interface to Google Maps
MIT License
226 stars 68 forks source link

Any tips on conditionally loading Google's API when the particular component is rendered? #10

Open braco opened 9 years ago

braco commented 9 years ago

Anyone successfully loaded Google's maps API and js only when the component is being rendered?

NickLydon commented 9 years ago

I was struggling with this. You might want to take a look at https://github.com/matnel/react-maps and in particular https://github.com/matnel/react-maps/blob/master/src/map.js#L96