npm react-router 6.0.0-beta.0
v6.0.0-beta.0

latest releases: 0.0.0-nightly-68f43b8cd-20241119, 0.0.0-nightly-4af1d409c-20241118, 0.0.0-nightly-818d327ce-20241117...
4 years ago

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!

Don't miss a new react-router release

NewReleases is sending notifications on new releases.