App Router: `useSearchParams` / `searchParams` static-bailout to client rendering not implemented
#1,524 opened on May 22, 2026
Repository metrics
- Stars
- (8,563 stars)
- PR merge metrics
- (Avg merge 1d 1h) (462 merged PRs in 30d)
Description
This issue was created by an agent analysing CI failures from the Next.js Deploy Suite (vinext
mainvs Next.jsv16.2.6, 2026-05-22).
Problem
Pages that read searchParams (server) or call useSearchParams() should bail out of the static prerender and render the params at request time. vinext renders the static shell only — the server component sees no search params, the client component never receives the value, and the Suspense fallback never appears in the prerendered HTML.
Expected: "Parameter: hello" Received: "Parameter: "
Expected string to include: "<p>search params suspense</p>"
Estimated Impact
~4 test failures across the deploy suite.
Affected Test Suites
test/e2e/app-dir/searchparams-static-bailout/searchparams-static-bailout.test.ts(3 failures)test/e2e/app-dir/app-static/app-static.test.ts
Recommendation
-
Reproduce first in vinext's own test suite. Add a page that reads
searchParamsin a server component and a client component usinguseSearchParams(). Assert the static prerender shows the Suspense fallback and the dynamic render includes the values. -
Implement the static-bailout. When
searchParams/useSearchParams()are read inside a prerendered component, bail out to dynamic rendering for the affected subtree and emit the Suspense fallback in the prerendered HTML.
Part of #1328.