MicheleBertoli / react-gmaps

A Google Maps component for React.js
http://react-gmaps.herokuapp.com/
MIT License
317 stars 68 forks source link

How to render React component in InfoWindow content? #85

Closed feux07 closed 7 years ago

feux07 commented 7 years ago

Hi everyone,

How to render React component in InfoWindow content? When I use ReactDOMServer.renderToString() method it is possible but events are not working with this way. As an example I prepared to this online webpackbin. https://www.webpackbin.com/bins/-KeUKeaOdpWnBZT9qFl8 When you click button in info window, onClick event not working.

Thanks (Sorry for my bad English)

MicheleBertoli commented 7 years ago

Hello @feux07!

Unfortunately renderToString does not activate the event handlers, and there are no other ways to render React components inside an InfoWindow at the moment.

PRs are welcome :)