g1eb / reactjs-calendar-heatmap

React component for d3.js calendar heatmap graph
https://rawgit.com/g1eb/reactjs-calendar-heatmap/master/
MIT License
151 stars 35 forks source link

Component keep flashing without displaying correct data #27

Closed melvinchia3636 closed 2 years ago

melvinchia3636 commented 2 years ago

Any solution for this?

https://user-images.githubusercontent.com/64565584/152376981-dfd30a60-b3d7-48d5-98db-f9bc12eb155d.mp4

g1eb commented 2 years ago

Oh interesting, my hunch is that it has to do with one (or more) properties changing and triggering a redraw on the visualization, I would need to look into it to know for sure.

Would you be able to share an example of this in a code sandbox for reproduction?

melvinchia3636 commented 2 years ago

well... turns out it's all my fault. Somehow I messed up the useEffect hook and it refresh the whole screen non-stop. Now I've got it fixed. Thanks!

g1eb commented 2 years ago

no problem! glad you got it working in the end :)