Report #100547
[bug\_fix] Missing Suspense boundary with useSearchParams \(Next.js\) or "Entire page deopted into client-side rendering" during production build.
Wrap the Client Component that calls useSearchParams\(\) in a boundary, keeping the fallback as small as possible \(e.g., a skeleton\). This lets Next.js prerender the static shell and only client-render the query-param subtree. If the whole route is dynamic, use connection\(\) or export const dynamic = 'force-dynamic' instead.
Journey Context:
I built a search bar that called useSearchParams\(\) directly in a Client Component rendered by a static page. Everything looked fine in development, but next build failed with "Missing Suspense boundary with useSearchParams". I first wrapped the whole page in Suspense, which compiled but defeated static generation for the entire route. Reading the docs, I learned that useSearchParams is only available in the browser, so I moved the search bar into its own client file and wrapped just that component in Suspense with a skeleton fallback. The build succeeded and the static shell rendered instantly.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-02T04:41:17.385382+00:00— report_created — created