Skip to content

DevTools: Re-think errors/warnings that do not have a 1:1 component mapping #20684

@bvaughn

Description

@bvaughn

#20463 added an option to display errors and warnings related to React components directly within the DevTools Components tree. The mechanism for associating an error or warning with a React component was to check if any Fiber was currently being rendered.

However this doesn't work for all types of warnings. For example, many strict mode warnings are not logged during render (per component), but instead are coalesced and logged as a group when the render work is committed. This was done to reduce the number of warnings React logged to the console. A side effect of this though is that DevTools isn't able to associate the warning with any components and so it does not get surfaced in the UI.

We should come up with a design that is able to handle errors/warnings that have a 1:many component mapping (like strict mode), as well as ones that might not even make sense to show in the Components tree at all (like hydration errors).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions