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
router.isReady
is not working correctly with React 18
#35754
Comments
Could you please provide a full reproduction (via GitHub or CodeSandbox)? I tried your example using the versions specified and I'm seeing |
I don't understand why this problem is caused. I prepared a sample project on GitHub: https://github.com/iuzn/next-router-with-react-18 CodeSandbox: https://codesandbox.io/s/next-router-with-react-18-eu4r7u I'm wondering where I went wrong. I've been checking everything one by one for hours. |
Hi, I was able to reproduce this with the above repo, the |
…5762) This fixes `router.isReady` being incorrect in dev mode due to the `isAutoExport` field being false from `hasConcurrentFeatures` being flagged similar to the static 404 in #35749. While investigating this I also noticed we aren't properly detecting react 18 when no `next.config.js` is present. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Errors have helpful link attached, see `contributing.md` Fixes: #35754 x-ref: #35749
Hi, this has been updated in the latest version of Next.js |
Yes, I updated. It now works properly. Thanks, @ijjk |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
…5762) This fixes `router.isReady` being incorrect in dev mode due to the `isAutoExport` field being false from `hasConcurrentFeatures` being flagged similar to the static 404 in vercel/next.js#35749. While investigating this I also noticed we aren't properly detecting react 18 when no `next.config.js` is present. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Errors have helpful link attached, see `contributing.md` Fixes: vercel/next.js#35754 x-ref: vercel/next.js#35749
Verify canary release
Provide environment information
What browser are you using? (if relevant)
Chrome 101.0.4951.15
How are you deploying your application? (if relevant)
Vercel
Describe the Bug
When I boot the next.js project in local with React 18,
router.isReady
returns false if the URL has a query value. When I deploy the project with Vercel, there is no such problem. The problem only occurs in local.Expected Behavior
The isReady query returns true when the page is loaded if the project is started in localhost.
To Reproduce
Example code:
The text was updated successfully, but these errors were encountered: