React Router v8 Upgrade Cost Two Days — Here’s What Actually Broke
React Router downloads exceed 50 million per week; a "boring" release that quietly mandates middleware, ESM-only, and Node 22 will break CI pipelines and silently corrupt pre-rendered pages for teams that treat it as a routine dependency bump.
A v7-to-v8 upgrade that was billed as a boring, flag-compatible release turned into a two-day effort across import paths, middleware, CI infrastructure, and a pre-rendering bug. The package rename from react-router-dom to react-router is mechanical but breaks third-party libraries still depending on the old name. Middleware is now default behavior, forcing auth logic out of loaders and into a middleware pipeline — otherwise loaders and middleware fight each other, causing flash redirects. Node 22.22.0+, React 19.2.7+, and Vite 7+ are hard requirements, so CI runners and Docker images stuck on Node 20 will fail. ESM-only enforcement breaks older webpack/Jest setups, and a pre-rendering serialization bug was only fixed in v8.3.1. v6 and Remix v2 are now EOL with no further security patches.
Calling a release "boring" for a package with 50M weekly downloads sets a false expectation: the changelog lists flag-compatible changes, but the real cost is architectural — moving auth from loaders to middleware is a design decision, not a find-and-replace.
The middleware-vs-loader conflict is a silent failure mode: the project runs, but pages flash and redirect unexpectedly because two auth layers execute in the wrong order with no clear error.
Infrastructure drift between local dev (Node 22) and CI/Docker (Node 20) is a common hidden tax on framework upgrades; the code works locally, but the pipeline reveals the real floor.
ESM-only is a hard cut that disproportionately punishes projects still on webpack 4 and older Jest, effectively bundling a build-tool migration into a router version bump.
The pre-rendering bug that shipped in v8.3.0 and was fixed in v8.3.1 shows that even "default behavior" carry-overs from removed flags can regress — waiting one patch version matters.
TanStack Router is gaining converts specifically because React Router's breaking changes are perceived as recurring; the switching cost is high for loader/action-heavy projects, but the frustration is real.