which library to use to draw simple graphs nodes,links in react? [closed] which library to use to draw simple graphs nodes,links in react? [closed] reactjs reactjs

which library to use to draw simple graphs nodes,links in react? [closed]


Tl;dr: Avoid react-* wrapper packages (for external libs) when you can. They'll tend to limit you later for all but basic usecases.

There's not really any reason to wait on a React adaptor for Cytoscape. The adaptor is being built for some guys who want to create really simple (mostly) visualisation-only React.Components -- like a simple page that goes along with a scientific publication.

In general, those react-* packages for external libs tend to fall into one of two categories, (1) simple libs or (2) complex libs. For (1), a react-* package could be OK if the lib it's wrapping has a small featureset to cover. For (2), these wrapper packages tend to cover only a small portion of the API. For both (1) and (2), you depend on the wrapper being up to date -- or being locked out of features.

As your app gets more and more developed, would you want to risk having to do a rewrite because your app is highly coupled to a react-* wrapper package that your app outgrew?

By and large, there's not that much benefit of using react-* wrapper packages. Especially for more complex cases like yours, you just limit what features you can use and how you can use them.

Whatever graph lib you choose -- be it Cytoscape or otherwise -- I recommend just writing your own React.Component tailored to what your app needs.

Personally, the only react-* packages I would use are ones that add features directly to React, like animations, routing, etc.


The resources above are 4 years old so thought to update. I would use react-digraph or react-flow - Both seems to be well supported.