r/webdev • • 24d ago

Showoff Saturday React Anatomy: click anything on a React page to see the component behind it, with the layout pulled apart in 3D (open source)

Post image

I used to open Excalidraw to understand how a React page was put together, or to explain a change in a PR: this box is the sidebar, these cards come from a list, the badge lives inside each card. It was slow, and it was my guess at the structure, not what React rendered.

React Anatomy is a browser extension that adds an Anatomy panel to DevTools. It connects the page to the components React rendered: pull the layout apart into layers, click anything on the page to find its component, focus a subtree, and read its live props.

It's even more useful in this AI era, when agents compose React layouts for you. Open the page and you can see which components the agent used, how they're nested, and what props each one gets, before you take the code over. People learning React have told me it helps them see what a page is made of.

It's free, MIT-licensed, and works in Chrome and Firefox. You can try it in the browser without installing anything: https://react-anatomy.com · Source: https://github.com/charpeni/react-anatomy

Two questions: where does the 3D view help or get in the way compared with a plain tree? And what would make it more useful for explaining a PR?

13 Upvotes

3 comments sorted by

1

u/s_maruyama_11 20d ago

The 3D view helps when nesting gets hard to untangle; for PRs, a shareable snapshot of the selected subtree with component names and props would save reviewers from installing the extension just to follow the explanation.

1

u/Wake08 20d ago

This is a good suggestion, thanks! Will introduce this in the next version.

0

u/[deleted] 23d ago

[deleted] — view deleted comment

1

u/Wake08 23d ago

No demo video? So there’s no video showing up on this Reddit thread?