cloudflare/vinext

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

Closed

#1,524 opened on May 22, 2026

 (0 comments) (0 reactions) (0 assignees)TypeScript (371 forks)github user discovery
adapter-api-e2ehelp wanted

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

Contributor guide