React + d3js: use React and parts of d3 or let d3 do it yourself

After looking at a few blog posts, I am left without a satisfactory answer.

I saw messages that responded to the creation of the component, and d3 processes everything inside this component (enter, update, exit), and I saw messages that recommend reacting to creating and deleting nodes inside the SVG and changing the d3 descriptor attributes on these nodes.

I'm still pretty new to respond, but I have a ton of d3js experience. Why I want to give React control for SVG nodes instead of letting d3 handle the rendering completely.

What are the pros and cons?

I know that the reaction uses virtual dom, and d3 uses something similar (I think this is called Smash).

For contextual information, here are a few blog posts that I link to:

+4
source share
1 answer

You are right that there is no consensus on this issue. I spent a lot of time studying this myself some time ago, and here is my conclusion:

  • If you just use some basic diagrams, then there are other libraries created, for example, victory.js, which you can use
  • , , d3 ,
  • - , , d3 . , , , , svg, ( , ) redux. . , , , . , , . , , . , d3, , . , .
+1
source

Source: https://habr.com/ru/post/1626246/


All Articles