r/reactjs • • 5d ago

Component tree visualised

Anyone have advice on a plugin or solution to visualise the react component hierarchy in a tree? All the solutions I’ve found online are mostly not maintained anymore . Any advice?

3 Upvotes

7 comments sorted by

6

u/Sad-Base-4887 5d ago

React devtools has a component tree tab built right in, works fine unless you need to export it or something.

1

u/Winodows_Gandy 2d ago

does that still hold up on really massive trees though, or does it start lagging out a bit?

4

u/huubhermsen 4d ago

I found that the default React Developer Tools do the job (https://react.dev/learn/react-developer-tools) it might not be the most appealing UI but does get the job done. Or do you have specific requirements that they don't cover?

2

u/charliematters 5d ago

This was mentioned here recently, but I haven't tried it personally

https://www.reddit.com/r/reactjs/s/5qWPDqHTbc

2

u/Just_Run8347 5d ago

https://react-anatomy.com/
Chrome plugin visualizes components and you can see the component tree of the component you are focused on. Looks fancy in 3d mode.

For vs code extensions:

Quick component nav/tree
https://marketplace.visualstudio.com/items?itemName=HabeebArul.react-component-tree

And

A node graph of components
https://marketplace.visualstudio.com/items?itemName=ReacTreeDev.reactree