Hacker News new | ask | show | jobs
by paulgb 1936 days ago
D3 still manipulates the DOM if you ask it to, but only a few of its subpackages actually manipulate the DOM directly (mostly the selection, axes, dragging, and zooming APIs IIRC). Everything else either transforms data structures within JavaScript, or generates SVG path strings which you can pass down into path elements through JSX.

The one place I’ve found it doesn’t quite play nice with React is not the DOM at all, but that the force simulation insists on modifying data in place where React wants things to be immutable, but it’s not a dealbreaker.