mirror of
https://github.com/cloudflare/vinext.git
synced 2026-09-14 19:04:59 +08:00
b678035956
* fix: don't await createFromReadableStream before hydrateRoot (#695) createFromReadableStream returns a React thenable, not a resolved tree. Awaiting it blocked hydrateRoot until the entire RSC stream was consumed, which prevented useEffect callbacks from ever firing in production on Cloudflare Workers where RSC chunks arrive progressively via script tags. Pass the thenable directly to hydrateRoot so React resolves components lazily as stream chunks arrive -- matching the RSC contract and the pattern already used in the SSR entry. Adds a regression test fixture and e2e test for the Workers hydration project that verifies useEffect fires after RSC hydration. * fix: move effect-test page to app-router-cloudflare example The cloudflare-workers e2e project builds examples/app-router-cloudflare, not tests/fixtures/cf-app-basic. Move the regression test fixture page to the correct location so the /effect-test route is actually served.
App Router on Cloudflare Workers
A minimal example of a Next.js App Router application running on Cloudflare Workers via vinext.
Demonstrates server components, client components, dynamic routes, and API route handlers.
Running Locally
- Install dependencies:
pnpm install
- Start the dev server:
pnpm dev
- Build for production:
pnpm build
- Preview the production build:
pnpm preview