Set up D3.js Inside React in 5 Minutes
Adil Baaj

Hey, great article. A couple of things to consider. The 4.0 version of D3 is now broken into ES6 modules and you can just import the pieces that you need. You can see a list of the Es6 modules here…

One approach for React is that you can just use the D3 layout algorithms, scales, etc to get your coordinates and geometry, but let React control what’s in the DOM. The 4.0 modules also avoid mutating your data which has been another issue with D3 and the whole React/Redux/Don’t-Mutate-The-State paradigm that’s all the rage these days. I put together some prototypes here to show the idea in repo here…

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.