Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DevTools Bug]: StrictMode not shown in component tree #21974

Closed
rickhanlonii opened this issue Jul 27, 2021 · 3 comments
Closed

[DevTools Bug]: StrictMode not shown in component tree #21974

rickhanlonii opened this issue Jul 27, 2021 · 3 comments
Labels
Component: Developer Tools Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Type: Bug

Comments

@rickhanlonii
Copy link
Member

Website or app

https://codesandbox.io/s/objective-lehmann-u2jn4?file=/src/App.js

Repro steps

  • Open React devtools in codesandbox
  • See that there's no StrictMode in the tree any more

Screen Shot 2021-07-27 at 4 56 17 PM

How often does this bug happen?

Every time

DevTools package (automated)

No response

DevTools version (automated)

No response

Error message (automated)

No response

Error call stack (automated)

No response

Error component stack (automated)

No response

GitHub query string (automated)

No response

@rickhanlonii rickhanlonii added Type: Bug Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Component: Developer Tools labels Jul 27, 2021
@rickhanlonii
Copy link
Member Author

Verified that the StrictMode component is being rendered to rule out any weirdness:

Screen Shot 2021-07-27 at 5 04 17 PM

@bvaughn
Copy link
Contributor

bvaughn commented Aug 30, 2021

IMO this is not a bug. It's an intentional decision, since <StrictMode> wrapper components are only one way to opt an app into strict behavior.

We have another task to track making it clear which subtrees are strict or not (82) as well as one for allowing devs to temporarily override strict behavior for an app/tree (#21367).

I'm going to close this task because I think it suggests work like #22201 which is only a partial solution. I'd rather approach something that addresses all of the above concerns.

Thanks! 🙇🏼

@bvaughn bvaughn closed this as completed Aug 30, 2021
@bvaughn
Copy link
Contributor

bvaughn commented Dec 8, 2021

Related UI investigation: #22886

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Developer Tools Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants