Β» npm install react-tree-graph
Videos
Β» npm install react-d3-tree
what's the best way to draw trees like this one in react from any data
βββββ
βββΌββ βββ
β ββΌβ
βββββββββ β β
β β ββββββ
βββββ¬ββββ β ββββ
β β ββΌββ
ββ¬ββββββ€ β
βββββ β β β
β βββββββ ββββββββ
βββββ β
β
β
I want each node to be a circle with image and clickable, pretty similar to how the skill tree looked in god of war 4. Should I use d3 or are there simpler ways ?
This can be achieved with a Browser Extension or a global npm package. (rarely a local one) Let me show you the two most popular tools.
React Sight (chrome extension)
React Sight is a live view of the component hierarchy tree of your React application with support for React Router and Redux.
Source: https://github.com/React-Sight/React-Sight
React Monocle (npm package)
React Monocle parses through your React source files to generate a visual tree graph representing your React component hierarchy. The tree is then displayed along with a live copy of your application.
Source: https://github.com/team-gryff/react-monocle
Use Sapling
Its a VSCODE extension. https://marketplace.visualstudio.com/items?itemName=team-sapling.sapling