heatmap.js icon indicating copy to clipboard operation
heatmap.js copied to clipboard

React integration ?

Open cristiandley opened this issue 9 years ago • 8 comments

Is there any future plan over React ?

cristiandley avatar Oct 06 '16 12:10 cristiandley

Yes, a React Heatmap component is planned. If it's urgent and you want to give it a shot, the angular-heatmap plugin could be a good starting point: https://github.com/pa7/heatmap.js/blob/master/plugins/angular-heatmap/angular-heatmap.js

pa7 avatar Oct 07 '16 15:10 pa7

@pa7 im working on two solutions, one is react-heatmap, and the other one is react-leaflet-heatmap

react-heatmap

react-leaflet-heatmap

i got both working just like integrations but not like components... now im trying to export react-heatmap functions and working on react-leaflet-heatmap. There is something about the last one that i dont get... why is this._origin called twice but newer used... is there a reason ?

Thanks !!!

cristiandley avatar Nov 02 '16 15:11 cristiandley

@cristiandley nice catch! that's an artifact from a previous implementation and can be removed :) are you planning to open a PR for the integrations?

pa7 avatar Nov 02 '16 19:11 pa7

@pa7 awesome !!! yes... i will be opening a PR as soon as i can :smile: (by the end of the week)

Talking about PR, im working on es6, could be add the babel setup or... just pure es5 ? or only the compiled version and avoiding the babel setup on the repo ? what should i do ?

cristiandley avatar Nov 02 '16 21:11 cristiandley

@pa7 are you there ?

cristiandley avatar Dec 03 '16 15:12 cristiandley

@cristiandley sorry, didn't see the edit about es6. I'd prefer not adding a babel setup for the whole repo as I'm currently not using es6, however you could add it in the plugins subfolder e.g. in a folder react-heatmap. Make sure to add the compiled code too so examples can reference it

pa7 avatar Dec 03 '16 15:12 pa7

I ended up wrapping your library @pa7 in a react component. It works quite nicely. I'm more than happy to contribute it back to your repo or you can add a reference to mine. Here's the react implementation.

smoghal avatar Nov 01 '19 21:11 smoghal

A while ago react-leaflet released v3 of react-leaflet, would like to see this plugin implementation in react-leaflet v3 too. The new api is completely different.

Duoquote avatar Jun 28 '21 06:06 Duoquote