btmills / react-datamaps

React component for D3 DataMaps
MIT License
31 stars 22 forks source link

Popup Templates should use React Components w/ full lifecycle #3

Open sankho opened 8 years ago

sankho commented 8 years ago

Currently you can only pass static markup to the popup tempaltes for bubbles / hovering over countries, arcs, etc.

You can use ReactDOMServer.renderToString to just get markup but then you're missing out on the component lifecycle methods e.g. componentDidMount, state and prop changes, etc.

@btmills This is the next thing I wanna work on for my project, can get started once the other updates etc are merged in. Might involve overriding datamap's native method for this.

btmills commented 8 years ago

This would be great! The static markup is such a kludge when everything else is React.