All Versions
14
Latest Version
Avg Release Cycle
65 days
Latest Release
11 days ago

Changelog History
Page 1

  • v6.0.0-alpha.5

    May 15, 2020

    Major Features

    • ➕ Added <Route preload> and route.preload (JSX and useRoutes) APIs. The preload function will be called when the route has matched and is about to render.
    • ➕ Added <NavLink end> and <NavLink caseSensitive> to better control matching behavior of <NavLink>s

    Major Changes

    🚀 Warning: This release breaks compatibility with 6.0.0-alpha.4

    • ✂ Removed the <Router history> prop and moved responsibility for setting up/tearing down the listener (history.listen) into the wrapper components (<BrowserRouter>, <HashRouter>, etc.). <Router> is now a controlled component that just sets up context for the rest of the app.
    • 🔄 Changed generatePath so it never returns placeholders. Instead, it will throw if a needed placeholder is missing.
    • ✂ Removed usage of React's experimental useTransition hook. We will publish our own "experimental" channel very soon with this hook added back in, but it won't be added back to the "next" channel (or stable) until it goes stable in React core.

    🛠 Bugfixes

    • 🛠 Fixed and improved several TypeScript interfaces

    📄 Docs

    • ➕ Added some docs for using the basename functionality to the migration guide

    Installing

    Development for v6 is happening on the dev branch.

    ✅ If you'd like to test it out, install from npm:

    $ npm install react-router@next react-router-dom@next
    

    Or, if you're on React Native:

    $ yarn add react-router@next react-router-native@next
    

    📚 We are actively working on documentation. For now, if you're just interested in testing things out you may be interested in the getting started guide. If you're interested in upgrading an existing app, please check out the v5 to v6 migration guide.

    Enjoy!

  • v6.0.0-alpha.4

    May 05, 2020

    🚀 Lots of great stuff in this release, especially if you like Intellisense :)

    Major Features

    • Migrated the core codebase to TypeScript and added TypeScript declarations
    • ➕ Added a migration guide for folks coming from reach/router
    • ➕ Added useInRouterContext hook for determining if you're in the context of a router or not
    • ➕ Added useLocationPending hook (experimental)
    • ➕ Added matchPath function for manually matching paths to URL pathnames

    🚀 Note: experimental features rely on an experimental release of React and will probably be moved into a separate "experimental" release channel in the near future.

    Major Changes

    🚀 Warning: This release breaks compatibility with 6.0.0-alpha.3

    • ⚡️ useSearchParams now returns [searchParams, setSearchParams] (similar to useState). setSearchParams is a wrapper for navigate that updates the query string on the current URL. See the updated guide on working with the query string.
    • ✂ Removed the <StaticRouter context> API. We don't support navigation on the initial render in v6, so this API is unnecessary.
    • useMatch takes a route path (instead of a link to value as it did previously). It should have always taken a route path; this was just a simple oversight.

    🛠 Bugfixes

    • 🛠 Fixed a bug with multiple nested * routes
    • 💻 Force stable sort in browsers that don't have it so routes that otherwise rank equally maintain the order in which they were originally defined

    Installing

    Development for v6 is happening on the dev branch.

    ✅ If you'd like to test it out, install from npm:

    $ npm install react-router@next react-router-dom@next
    

    Or, if you're on React Native:

    $ yarn add react-router@next react-router-native@next
    

    📚 We are actively working on documentation. For now, if you're just interested in testing things out you may be interested in the getting started guide. If you're interested in upgrading an existing app, please check out the v5 to v6 migration guide.

    Enjoy!

  • v6.0.0-alpha.3

    April 04, 2020

    Major Features

    • ➕ Added a new useSearchParams hook (see f59ee54)

    📜 The useSearchParams hook returns a URLSearchParams object created from the current location.search string. This is a feature that people have wanted for a while, but we were always hesitant to ship a full-blown query parser with the router. Well, now that we have URLSearchParams widely available, we don't have to. I wrote up a small guide about how to use useSearchParams if you'd like to read more.

    Major Changes

    🚀 Warning: This release breaks compatibility with 6.0.0-alpha.2

    • 👀 Redirect (and redirectTo in useRoutes) was removed (see cbcd398)
    • 👍 We no longer support redirecting on the initial render, due to compatibility issues with future versions of React

    ⚡️ React won't let us change the state in an ancestor component on the initial render w/out warning, so we had to remove the <Redirect> component, as well as the ability to do a navigate() on the initial render. You can still render a <Navigate>, but it won't actually update the page until the next render.

    💻 If you really need to redirect on the initial render, you can either a) do it on your server (probably best, so it can be cached at the HTTP level instead of doing it in every user's browser) or b) do it outside of React Router (e.g. using the history API directly).

    Installing

    Development for v6 is happening on the dev branch.

    ✅ If you'd like to test it out, install from npm:

    $ npm install react-router@6 react-router-dom@6
    

    Or, if you're on React Native:

    $ yarn add react-router@6 react-router-native@6
    

    📚 We are actively working on documentation. For now, if you're just interested in testing things out you may be interested in the getting started guide. If you're interested in upgrading an existing app, please check out the v5 to v6 migration guide.

    Enjoy!

  • v6.0.0-alpha.2

    February 22, 2020

    🚀 This release fixes a few bugs with the previous alpha, namely:

    • 🛠 Fix a few path matching corner cases
    • 🛠 Fix rendering <Link>s on the server (see #7126, thanks @danpantry)

    🌐 Also, we added a new doc about adding React Router to your web project whether you're using create-react-app, Webpack, Parcel, or just plain 'ol <script> tags. Thanks @chancestrickland!

    Development for v6 is happening on the dev branch.

    ✅ If you'd like to test it out, install from npm:

    $ npm install history@5 react-router@6 react-router-dom@6
    

    Or, if you're on React Native:

    $ yarn add history@5 react-router@6 react-router-native@6
    

    📚 We are actively working on documentation. For now, if you're just interested in testing things out you may be interested in the getting started guide. If you're interested in upgrading an existing app, please check out the v5 to v6 migration guide.

    Enjoy!

  • v6.0.0-alpha.1

    February 01, 2020

    🚚 Moved history from peerDependencies to dependencies. This should make it easier for people to install and test.

  • v6.0.0-alpha.0

    January 31, 2020

    🚀 First alpha release of the next major version of React Router, version 6. A few of the highlights are:

    • Relative routes and links
    • Nested <Route>s
    • Automatic<Route> ranking with a new <Routes> API
    • 🆕 New suspense-ready navigate API
    • useRoutes + matchRoutes for using object-based routing API

    Development for v6 is happening on the dev branch.

    ✅ If you'd like to test it out, install from npm:

    $ npm install history@5 react-router@6 react-router-dom@6
    

    Or, if you're on React Native:

    $ yarn add history@5 react-router@6 react-router-native@6
    

    📚 We are actively working on documentation. For now, if you're just interested in testing things out you may be interested in the getting started guide. If you're interested in upgrading an existing app, please check out the v5 to v6 migration guide.

    Please note that although there are several breaking changes we are still working on the migration path and will continue to publish improvements and helpers in v5 that should help you upgrade as smoothly as possible. We are not done with v5. Heck, we're still cutting releases of v3.

    🚀 This release addresses several long-standing issues and pitfalls with previous releases. We are focused on providing a smooth upgrade path for both v4/5 users and v3 users who would like to make the jump to v6. We will be publishing more very soon.

    Enjoy!

  • v5.2.0

    May 11, 2020

    🚀 This release includes a notable performance boost by separating the "Router" context from the "History" context internally. We also allow every element type for Link's component prop and support a sensitive prop on NavLink for control over case sensitive matching.

    Enjoy!

    Changes

  • v5.1.2

    September 30, 2019

    List of commits

    🛠 Bugfixes

    • 🛠 Fix lingering <Link ref> error on React 15 (#6954)
  • v5.1.1

    September 27, 2019

    List of commits

    🛠 Bugfixes

    • 🛠 Fix issue with useParams reading from null object (#6940)
    • 🛠 Fix regression passing ref to functional components in React <= 16.2 (#6934)
    • 🛠 Fix regression passing empty string to matchPath (#6941)
  • v5.1.0

    September 24, 2019

    Read the blog post

    List of commits

    🔋 Features

    • ➕ Add useParams, useLocation, useHistory, and useRouteMatch hooks (d6224d6)
    • ➕ Add support for forwardRef in <Link> (b5528ed)
    • ➕ Add support for functions in <Link to> and <NavLink to> (#5331, #5368)
    • ➕ Add <Link component> API (#5437)

    🛠 Bugfixes

    • Don't render <Route children> elements when the <Route> does not match (9665659)