Skip to content

App Router: useSearchParams / searchParams static-bailout to client rendering not implemented #1524

Description

@james-elicx

This issue was created by an agent analysing CI failures from the Next.js Deploy Suite (vinext main vs Next.js v16.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

  1. Reproduce first in vinext's own test suite. Add a page that reads searchParams in a server component and a client component using useSearchParams(). Assert the static prerender shows the Suspense fallback and the dynamic render includes the values.

  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions