-
Notifications
You must be signed in to change notification settings - Fork 47k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DevTools] Track DOM nodes to Fiber map for HostHoistable Resources (#…
…30590) Follow up from #30584. You can already select a singleton or hoistable (that's not a resource) in the browser elements panel and it'll select the corresponding node in the RDT Components panel. That works because it uses the same mechanism as event dispatching and those need to be able to receive events. However, you can't select a resource. Because that's conceptually one to many. This keeps track of which fiber is acquiring which resource so we can find all the corresponding instances. E.g. now you can select the `<link rel="stylesheet">` in the Flight fixture in the Element panel and then the component that rendered it in the Components panel will be selected. If we had a concept multi-selection we could potentially select all of them. This similar to how a Server Component can be rendered in more than one place and if we want to select all matching ones. It's kind of weird though and both cases are edge cases. Notably imperative preloads do have elements that don't have any corresponding component but that's ok. So they'll just select `<head>`. Maybe in dev we could track the owners of those.
- Loading branch information
1 parent
3af905d
commit 8a70d31
Showing
1 changed file
with
112 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters