Migrating to Remix remix@3.0.0-beta.4
Version remix@3.0.0-beta.4 introduces 2 breaking changes. This guide details how to update your code.
Released: 6/5/2026
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
remix/routerremix/fetch-routernext()Responserouter.mount()RouteBuilderRouteInstallerRouterContextRouterTypes.contextcreateAction()createController()MiddlewareContextcreateMiddleware()MiddlewarecreateRouter()router.map()MapTargetMapHandlerremix/assertassert.okassert.partialDeepEqualremix/testt.signalBreaking Changes
●Issue #1
Middleware consumed through `remix/router` and `remix/fetch-router` must now explicitly continue the request chain by calling `next()` or return a `Response`. Middleware that returned `undefined` without calling `next()` now throws at runtime instead of implicitly continuing. Fix by ensuring middleware returns `next()` or a `Response`.
●Issue #2
`MapTarget` and `MapHandler` are no longer re-exported from `remix/router` or `remix/fetch-router`. Use the public `Router`, `RouteBuilder`, `RouteInstaller`, `Action`, and `Controller` types instead.
Migration Steps
- 1Update context-loading middleware in `remix/router` or `remix/fetch-router` to explicitly return the downstream response, typically by calling `return next()`.
- 2Replace usage of re-exported `MapTarget` and `MapHandler` with the public `Router`, `RouteBuilder`, `RouteInstaller`, `Action`, and `Controller` types.
Release Summary
This pre-release introduces significant router enhancements, including route mounting capabilities and improved middleware contract enforcement, alongside better Node assertion compatibility.
Need More Details?
View the full release notes and all changes for Remix remix@3.0.0-beta.4.
View Full Changelog