4 ms·
I had come to the same conclusion as I'm very sympathetic to the React mindset, and thought that combining the d3 "math-y bits" with React as a rendering engine
by jcheng 11y ago
I had come to the same conclusion as I'm very sympathetic to the React mindset, and thought that combining the d3 "math-y bits" with React as a rendering engine might be the very best of both worlds.
But the one thing that I couldn't find a good solution to, was transitions/animations as data changes. Support for transitions in d3 is quite impressive (often just calling .transition() on your selection) and I couldn't find nearly as nice a solution with React, though chenglou[0] seems to be making continuous progress.
[0] https://github.com/chenglou https://github.com/chenglou
- snappy173 11y agoI just stuck with d3, and used the react lifecycle methods to trigger redraws and such. http://bl.ocks.org/cpapazian/6228888157c39be85e9c http://bl.ocks.org/cpapazian/6228888157c39be85e9c The D3Component wrapper lets you put a d3-style reusable component inside of a react dom tree, using react props to pass parameters and event handlers to the d3 chart.