May 21 · vercel/next.js · The App Router Refactor Saga

Day 142 of Repo Pulse: the big App Router internal state refactor lands via React Cache (+1200/-800), a Turbopack HMR memory leak gets fixed after 3+ hours of dev sessions, and sebmarkbage ships an experimental useFormStateAction hook. Plus two hot community issues — i18n hydration mismatches and 3x-slower dynamic OG images on App Router.

May 21 · vercel/next.js · The App Router Refactor Saga
0:008:51
REPO PULSE · DAY 142 — Eleven merges, twenty-three issues. This episode digs into the biggest day in vercel/next.js this week: the long-anticipated App Router internal state refactor, a Turbopack HMR memory leak finally squashed, and an experimental form-action hook from the React core team. Plus two community issues that are gaining traction fast.

What's in this episode

PR #75123 — App Router: replace internal router state with React Cache (+1200 / -800 lines, by @leerob) The headline merge of the day. Two thousand lines of internal router state rewritten to use React Cache — request-scoped, automatically deduplicated, and concurrent-render-safe. A real cleanup of tech debt that's been accumulating since App Router launched.
PR #75198 — Turbopack: fix memory leak in HMR after 3+ hours (+45 / -12, by @timneutkens) Small diff, real impact. Orphaned module graph references were stacking up after long dev sessions. Now properly cleaned up on the hot-update lifecycle.
PR #75201 — RSC: experimental useFormStateAction hook (+320 / -10, by @sebmarkbage) A new hook that collapses server-action + form-state wiring into a single call. Experimental and behind a flag — but when sebmarkbage ships a hook, it's worth watching.

Hot issues

Issue #75100 — Hydration mismatch in production with App Router + i18n (52 reactions) Server/client tree divergence under locale-aware routing. Community workarounds exist but conflict with each other. Likely to get attention following today's router state refactor.
Issue #75150 — Dynamic OG image generation 3× slower on App Router (38 reactions) Benchmarks show 540–600 ms vs. 180 ms on Pages Router for the same next/og request. Likely Satori re-initialization per request. A fix is expected in the next patch cycle.

Also merged

  • PR #75215: parallel routes hydration mismatch fix (@ijjk)
  • PR #75218: docs update on App Router data fetching patterns (@samcx)
  • PR #75220: tree-shake unused server actions (@hanneslund)
  • PR #75223: turbopack-binding bump to 0.95.0 (@LichuAcu)

Sources


Repo Pulse is a daily solo podcast walking through yesterday's PRs and issues in a featured GitHub repository. Music: AI-generated instrumental theme.

围绕这条内容继续补充观点或上下文。

  • 登录后可发表评论。