-
Notifications
You must be signed in to change notification settings - Fork 377
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
useSearchParams() should be wrapped in a suspense boundary at page "/update-prompt" #90
Comments
Hello, I have the same error. And I fixed it, disabling this rule in the nextConfig file. module.exports = { Is not the best approach. But it resolved it for me. I don`t know where i need to wrap the suspense tag, so i hope can anyone help |
Just simply wrap the component where useSearchParams is being used in a Suspense component, here is the code -
For more info : https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout |
Je suivais exactement le même tuto ça matche |
I get the following Error when building the solution (it works in DEV): >>>
useSearchParams() should be wrapped in a suspense boundary at page "/update-prompt". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout
Error occurred prerendering page "/update-prompt". Read more: https://nextjs.org/docs/messages/prerender-error
<<<
The documentation mentions this behavior appears when we use useSearchParams hook in a statically rendered page/route. If we want to keep this page static rendered then it says to use Suspense boundary but I cannot get any solutions to build so far.
Has anyone managed to get this to work please without disabling the rule (you can disable it by setting the missingSuspenseWithCSRBailout option to false in your next.config.js)?
I am using Next.js version 14.1.0 and React 18.
Thanks
The text was updated successfully, but these errors were encountered: