react-chartjs-2
react-chartjs-2 copied to clipboard
Shallow props comparison in shouldComponentUpdate() makes charts redraw too frequently
The intention of the code seems to be that it will only redraw when the props are actually different, but in practice, it redraws as long as the props are a different object (i.e. basically always).
Hey @leifkb,
Apologies for late reply. You are correct, we should either do deep comparison (somewhat performance ineffective) or we can return false for shouldComponentUpdate and if "redraw" is true in componentWillReceiveProps force an update?
Any thoughts are welcome.
Thanks for your time.