cloudflare/vinext

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

クローズ

#1,524 opened on 2026/05/22

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (383 件のフォーク)github user discovery
adapter-api-e2ehelp wanted

Repository metrics

Stars
 (8,624 個のスター)
PR merge metrics
 (平均マージ 1d 1h) (30d で 462 merged PRs)

説明

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.

コントリビューターガイド