react-router-dom
Advanced tools
Changelog
v7.5.0
Date: 2025-04-04
route.lazy
Object APIWe've introduced a new route.lazy
API which gives you more granular control over the lazy loading of route properties that you could not achieve with the route.lazy()
function signature. This is useful for Framework mode and performance-critical library mode applications.
createBrowserRouter([
{
path: "/show/:showId",
lazy: {
loader: async () => (await import("./show.loader.js")).loader,
action: async () => (await import("./show.action.js")).action,
Component: async () => (await import("./show.component.js")).Component,
},
},
]);
⚠️ This is a breaking change if you have adopted the route.unstable_lazyMiddleware
API which has been removed in favor of route.lazy.unstable_middleware
. See the Unstable Changes
section below for more information.
react-router
- Add granular object-based API for route.lazy
to support lazy loading of individual route properties (#13294)@react-router/dev
- Update optional wrangler
peer dependency range to support wrangler
v4 (#13258)@react-router/dev
- Reinstate dependency optimization in the child compiler to fix depsOptimizer is required in dev mode
errors when using vite-plugin-cloudflare
and importing Node.js builtins (#13317)⚠️ Unstable features are not recommended for production use
react-router
- Introduce future.unstable_subResourceIntegrity
flag that enables generation of an importmap
with integrity
for the scripts that will be loaded by the browser (#13163)react-router
- Remove support for the route.unstable_lazyMiddleware
property (#13294)
route.lazy.unstable_middleware
API@react-router/dev
- When future.unstable_viteEnvironmentApi
is enabled, ensure critical CSS in development works when using a custom Vite base
has been configured (#13305)create-react-router
react-router
@react-router/architect
@react-router/cloudflare
@react-router/dev
@react-router/express
@react-router/fs-routes
@react-router/node
@react-router/remix-config-routes-adapter
@react-router/serve
Full Changelog: v7.4.1...v7.5.0