All Versions
16
Latest Version
Avg Release Cycle
62 days
Latest Release
1405 days ago

Changelog History
Page 1

  • v6.0.0-beta.0 Changes

    June 19, 2020

    ๐Ÿš€ Today we are very happy to release the first beta of React Router version 6!

    Major Features

    ๐Ÿš€ No new features in this release since alpha.5, besides the fact that we are now using history v5 stable in various places behind the scenes.

    Major Changes

    There are a few breaking changes from alpha.5:

    • ๐Ÿš€ Moved <Route preload> into the experimental release channel
    • ๐Ÿš€ Moved useLocationPending into the experimental release channel
    • Made react-router a regular dependency of react-router-dom and react-router-native
    • Made history a peer dependency
    • ๐Ÿ“‡ Renamed useResolvedLocation to useResolvedPath to be more inline with the naming in the history API
    • ๐Ÿ“‡ Renamed resolveLocation to resolvePath to be more inline with the naming in the history API

    ๐Ÿ›  Bugfixes

    • We now re-use the sourcemap output from tsc as input into the Rollup toolchain, so sourcemaps go all the way back to the original source instead of stopping at the tsc-generated files

    ๐Ÿ“„ Docs

    Installing

    Development for v6 is happening on the dev branch.

    โœ… If you'd like to test it out, install from npm:

    $ npm install history react-router-dom@next
    

    Or, if you're on React Native:

    $ yarn add history react-router-native@next
    

    Roadmap

    ๐Ÿ“š Now that we are in beta, you can expect fewer breaking changes (if any) between releases in the next channel. We are actively developing features targeted at supporting suspense for data loading in the experimental channel. The main thing left to do is documentation and guides (and fix bugs, ofc). If you can spare some time, we'd love to have some help :)

    ๐Ÿ“š 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. There is also a comprehensive API Reference.

    Enjoy!

  • v6.0.0-alpha.5 Changes

    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 Changes

    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 Changes

    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 Changes

    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 Changes

    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 Changes

    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 Changes

    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 Changes

    September 30, 2019

    List of commits

    ๐Ÿ›  Bugfixes

    • ๐Ÿ›  Fix lingering <Link ref> error on React 15 (#6954)
  • v5.1.1 Changes

    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)