Never miss a release that matters
AI-powered summaries of every GitHub release.
AI Summaries
Changelogs condensed into clear, actionable insights.
Always Free
Track up to 5 packages at no cost, forever.
Weekly Digest
A curated summary of every release, delivered weekly.
TL;DR
React Router now supports createMemoryRouter for testing and server rendering without a history object (a browser's session history).
Fixes Worth Knowing
- Resolved an issue where
useLoaderDatawould re-render on every route change when usingcreateBrowserHistory. - Fixed a bug causing incorrect URL parsing with nested routes and URLSearchParams.
Before You Upgrade
If you are using createBrowserHistory and experiencing excessive re-renders with useLoaderData, no action is needed – this release resolves that issue.
TL;DR
React Router now supports data loaders returning promises that reject, allowing for more robust error handling during data fetching (data loading).
Breaking
useLoaderDatanow throws errors when a data loader promise rejects (previously logged to console).createBrowserRouternow requires a function for theactionprop, not just an object (for consistent behavior).
New
- Data loaders can now return
rejected promises to signal errors, improving error boundary integration. useLoaderDatanow accepts an optionalselectfunction to transform loader data.
Fixes Worth Knowing
- Fixed an issue where nested routes with index loaders would not render correctly.
- Improved type definitions for better developer experience (TypeScript).
TL;DR
React Router now avoids peer dependency warnings with React 18 by bundling a necessary context module internally.
Breaking
- None
New
None
Fixes Worth Knowing
Resolved peer dependency warnings when using React Router with React 18 (JavaScript library for building UIs).
Before You Upgrade
No action needed. This change resolves a warning and requires no code modification.
TL;DR
React Router v6.4 is now powered by @remix-run/router, offering improved data loading and mutation capabilities for more robust web applications.
Breaking
- Directly using
@remix-run/routeris now the intended approach for building routing libraries (for library authors only).
New
- Enhanced data loading and mutation support via
@remix-run/router(improves app responsiveness).
Fixes Worth Knowing
- None.
Before You Upgrade
- If you are not building a routing library, no action is needed. Continue using
react-router.
TL;DR
React Router v6 is shifting router creation and management to userland, requiring you to explicitly create and pass a router instance to the <RouterProvider>. This simplifies testing and improves compatibility with React 18’s useSyncExternalStore.
Breaking
<DataMemoryRouter>,<DataBrowserRouter>,<DataHashRouter>,<DataRouterProvider>, and<DataRouter>are removed. (Previous router components)createMemoryRouter,createBrowserRouter, andcreateHashRouterare now inreact-router/react-router-dom. (Router creation functions)
New
<RouterProvider>: A new component accepting a router instance. (Core component for rendering routes)createRoutesFromElements: A function to create route objects from JSX. (Alternative to JSX route definition)
Fixes Worth Knowing
- Router singleton issues are resolved, fixing problems with unit tests, conditional routes, HMR (Hot Module Replacement), and external state management.
Before You Upgrade
- Replace usages of the removed router components (
<DataBrowserRouter>, etc.) with<RouterProvider>and explicitly create a router usingcreateBrowserRouterorcreateHashRouter.
TL;DR
React Router now uses <Await> instead of <Deferred> to display data fetched with loaders, offering more flexibility with promises and clearer code.
Breaking
<Deferred>component renamed to<Await>(data display component)useDeferredValueanduseErrorhooks renamed touseAsyncValueanduseAsyncError(data fetching hooks)
New
<Await>now accepts any promise, not just those returned bydefer()(promise handling).
Fixes Worth Knowing
- Loaders now always return a Promise, improving consistency (data loading).
Before You Upgrade
- Replace all instances of
<Deferred>with<Await>in your routes. - Update any usages of
useDeferredValueanduseErrortouseAsyncValueanduseAsyncErrorrespectively.
No release notes content available to summarize.
TL;DR
React Router now fully supports the latest React versions, ensuring compatibility and stability for users on recent React releases.
Breaking
- None.
New
None.
Fixes Worth Knowing
None.
Before You Upgrade
None.
TL;DR
React Router now avoids using eval during development, improving compatibility with stricter Content Security Policies (security settings for web pages).
Breaking
evalis no longer used in development builds (potentially impacts custom CSP configurations).
New
(None)
Fixes Worth Knowing
(None)
Before You Upgrade
If you have a custom Content Security Policy that restricts eval, no action is needed. Otherwise, ensure your CSP allows unsafe-eval if you rely on it for other development tools.
TL;DR
React Router now supports passing parameters to <Redirect> components and includes a new generatePath function (for creating URLs from route paths).
Breaking
react-router-reduxis deprecated (a library for integrating with Redux). Consider using@supasate/connected-react-routeror future React Router features for Redux integration.
New
<Redirect>with params: Allows redirecting with dynamic data.generatePathAPI: Creates URLs from route paths, enabling more flexible URL construction.
Fixes Worth Knowing
- Links with query parameters (
?foo=bar) now work correctly. - Special characters in paths are now properly escaped in
<NavLink>. <Link>components now require atoproperty, preventing errors.
Before You Upgrade
If you are using react-router-redux, plan a migration to a supported Redux integration solution.
TL;DR
React Router v3 introduces significant changes, requiring updates to your history implementation and removing all previously deprecated features from v2.3.0 and v2.6.0.
Breaking
- History v3 Required: (Navigation library) Upgrade to history v3 to maintain compatibility.
- Deprecated Functionality Removed: Code relying on deprecated features from v2.3.0 and v2.6.0 will no longer work.
- Link/withRouter Update:
<Link>andwithRouternow update correctly within static containers.
New
- Async Route Support: Route functions can now return Promises for asynchronous data loading.
- Enhanced
withRouter:withRouternow providesparams,location, androutesprops, and allows overriding the router instance. - Flexible
<Link>:<Link>now accepts a function for thetoprop, enabling dynamic route generation.
Fixes Worth Knowing
- Redirects with Query: Redirects now correctly handle query parameters.
- Omit
toon<Link>: You can now use<Link>without a `
TL;DR
React Router now supports omitting the to prop on <Link> components, providing a more flexible way to define links.
Breaking
getChildRoutesandgetIndexRoutenow receivepartialNextStateinstead oflocation(route configuration).- Accessing
locationdirectly withingetChildRoutesandgetIndexRouteis deprecated.
New
withRouternow accepts awithRefoption for accessing wrapped component instances (component utility).onLeavehooks now receiveprevStateas an argument (route lifecycle).
Fixes Worth Knowing
- Fixed issues with redirects containing query parameters.
- Corrected handling of routes with reserved property names.
- Resolved
<Link>click behavior when rendered outside a router context.
Before You Upgrade
- Update your route configurations to use
partialNextState.locationinstead oflocationingetChildRoutesandgetIndexRoute.
TL;DR
React Router now supports React 0.15, ensuring compatibility with the latest React version.
New
Support for React 0.15 (JavaScript library for building UIs).
Fixes Worth Knowing
<Link> components (navigation components) now correctly pass through extra props, resolving potential styling or behavior issues.
Before You Upgrade
If you are using React 0.15, no action is needed. Otherwise, this is a recommended update for continued compatibility.
TL;DR
React Router now requires explicit import of <Router>, and improves initial route matching for better performance.
Breaking
<Router>is no longer a default export (must be imported directly).
Fixes Worth Knowing
- Corrected initial routing state (how the app loads).
- Improved route matching performance (faster navigation).
Before You Upgrade
- Update your import statements to explicitly import
<Router>:import { Router } from 'react-router';
TL;DR
React Router has been significantly rewritten with a focus on composable components and a more flexible history management system, offering enhanced control over routing and navigation.
Breaking
handlerprop onRouteis removed: Use children instead.paramsfromRoutingContextchild context is removed and re-added: Access params directly on theRoutingContextitself.un)registerRouteHookis removed: New lifecycle hooks are available.- History dependency change: Now requires a separate
historypackage (peer dependency).
New
- Index routes & links:
<IndexLink>and<IndexRoute>components simplify handling of index/root routes. - Redirects:
<Redirect>component allows programmatic navigation to different routes. - Greedy splats:
**allows matching any number of segments in a URL.
Fixes Worth Knowing
- Correctly handles query parameters and URL encoding.
- Improved
isActivebehavior for nested routes and index links. - Fixes for Windows installation and hash-based routing.