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

Strict Mode in pages router #753

Closed
aretrace opened this issue Jun 19, 2024 · 6 comments
Closed

Strict Mode in pages router #753

aretrace opened this issue Jun 19, 2024 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@aretrace
Copy link

react-compiler-healthcheck does not detect strict mode in the npm create waku@latest project template. It should be on by default, placing <StrictMode> tag on the root _layout works.

@dai-shi
Copy link
Owner

dai-shi commented Jun 19, 2024

Thanks for reporting. Can anyone investigate it please?

@dai-shi dai-shi added the help wanted Extra attention is needed label Jun 19, 2024
@dai-shi
Copy link
Owner

dai-shi commented Jun 19, 2024

#755 might be related.

@ojj1123
Copy link
Contributor

ojj1123 commented Jun 27, 2024

This is the upstream issue.
I've tested the case: Next.js project with reactStrictMode: true of next.config.js. But it also did shows StrictMode usage not found.
As this PR facebook/react#30099, react-compiler-healthcheck just check whether or not there is reactStrictMode: true option.

So If we want the healthcheck detects the strict mode in waku project, we need to open the PR that react-compiler-healthckeck can checks the strict mode in waku project. (But I don't think it is a good workaround.)

@ojj1123
Copy link
Contributor

ojj1123 commented Jun 27, 2024

react-compiler-healthcheck just checks whether or not js(x) files use <React.StrictMode /> component.
As waku use <StrictMode /> component by default internally, the healthcheck couldn't detect StrictMode

https://github.com/facebook/react/blob/fcfbfc1d1e3e350e1ea3fbc4a2418f647dc28a31/compiler/packages/react-compiler-healthcheck/src/checks/strictMode.ts#L24-L26

@dai-shi
Copy link
Owner

dai-shi commented Jul 13, 2024

So, it's not an issue on our end, and it's probably not fixable?

@ojj1123
Copy link
Contributor

ojj1123 commented Jul 13, 2024

Yeah, I think so.
If you want to fix it, you maybe open the PR on React. And this healthcheck needs to depend on Waku internal. So I think it's good to remain as non-fixable.

@dai-shi dai-shi closed this as not planned Won't fix, can't repro, duplicate, stale Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants