react/packages/react-devtools-shared
Sebastian Markbåge 2b00018347
[DevTools] Track the parent DevToolsInstance while mounting a tree (#30542)
This just tracks the `.parent` field properly and uses DevToolsInstances
in more places that used to use IDs or Fibers.

I also use this new parent path when looking up a DevToolsInstance from
a DOM node. This should ideally be simple because the `.parent` field
represents only the unfiltered parents and include any virtual parents.
So we should be able to just get one from nearest Fiber that has one.

However, because we don't currently always clean up the map of
DevToolsInstances (e.g. updateComponentFilters doesn't recursively clean
out everything) it can leave matches hanging that shouldn't be there. So
we need to run the shouldFilterFiber filter to ignore those.

Another interesting implication is that without a FiberInstance we don't
have a way to get to a VirtualInstance from a HostComponent. Which means
that even filtered Fibers need to have a FiberInstance if they have a
VirtualInstance parent. Even if we don't actually mount them into the
front-end.
2024-07-31 10:07:17 -04:00
..
src [DevTools] Track the parent DevToolsInstance while mounting a tree (#30542) 2024-07-31 10:07:17 -04:00
babel.config.js DevTools: Drop IE 11 support (#19875) 2020-09-21 11:07:45 -04:00
buildUtils.js feat[devtools]: add package for fusebox integration (#28553) 2024-04-12 15:29:35 +01:00
package.json feat[devtools]: symbolicate source for inspected element (#28471) 2024-03-05 12:32:11 +00:00
README.md Update DevTools READMEs (#24105) 2022-03-16 11:37:10 -04:00
SourceMapIgnoreListPlugin.js feat[devtools]: ship source maps for content scripts and ignore list installHook script (#28730) 2024-04-08 18:10:09 +01:00

This directory contains code shared between several DevTools packages:

  • /packages/react-devtools-core
  • /packages/react-devtools-extensions
  • /packages/react-devtools-inline

It is not published or released anywhere directly.