Releases: remix-run/react-router
v4.4.0-beta.0
This is primarily a maintenance release that is fully backwards compatible with 4.3.1 while also improving compatibility with React 16 and preparing for the future.
The main features of this release are:
- Removed the single-child restriction in
<Router>
so you can have multiple children, provided you're using React 16 - Migrated our underlying infrastructure to use React's new context API. A HUGE thank-you to @timdorr who provided the initial work required to migrate the codebase to React's new context API (see #5908)
- Removed all traces of the deprecated
componentWillMount
andcomponentWillReceiveProps
🚨 If you were accessing our private context API your code will break. If you need stuff on context, use a <Route>
or withRouter
instead. It's all the same stuff, and that's our public API 🚨
Other housekeeping that was done:
- Migrated to use
babel-preset-env
+ a custom list of proposal plugins we use instead of the deprecatedbabel-preset-es2015
+babel-preset-stage-1
- Improved testing infrastructure. Now, instead of running a build when you're working on e.g.
react-router-dom
and you need some changes inreact-router
, you don't have to go and rebuild it to test things out. This should make the repo easier to work with - Added some more warnings in dev mode
As always, you can try everything out using the next
tag:
yarn add react-router@next
yarn add react-router-dom@next
yarn add react-router-config@next
We will be paying close attention to the feedback on this release and hope to release 4.4.0 final soon!
Enjoy 😅
v4.3.1
v4.3.0
The major new things of this release are Redirect with params (see #5209) and the new generatePath
API. We also cleaned up the code with Prettier, so browsing through it should be more enjoyable.
One other thing to mention, while I have your attention, is the deprecation of react-router-redux. It's no longer maintained and has a number of fundamental problems (particularly around time travel). Integrating Redux and the DOM History API is challenging because they don't maintain the same semantics and the resulting integration is error prone. Getting to the router context will be easier in future versions of React Router, so the main motivations for needing it will be going away. So, while I would advise against trying to integrate the two, for those that still want this functionality can turn to libraries like @supasate's connected-react-router.
Changes
- Use the
pretty
option in generatePath (#6172 by @sibelius) - aria-current has incorrect value "true" (#6118 by @brandonrninefive)
- Redirect with parameters (#5209 by @dlindenkreuz)
- Fix with missing pathname:
<Link to="?foo=bar">
(#5489 by @pshrmn) - Escape NavLink path to allow special characters in path. (#5596 by @esiegel)
- Expose
generatePath
(#5661 by @rybon) - Use named import of history module. (#5589 by @RoboBurned)
- Hoist dependencies for smaller UMD builds (#5720 by @pshrmn)
- Remove aria-current from navLink when inactive (#5508 by @AlmeroSteyn)
- Add invariant for missing "to" property on
<Link>
(#5792 by @selbekk) - Use Prettier on the code (e6f9017 by @mjackson)
- Fix pathless route's match when parent is null (#5964 by @pshrmn)
- Use history.createLocation in
<StaticRouter>
(#5722 by @pshrmn)
v4.3.0-rc.3
Changes
- Fix broken UMD builds.
- Add sideEffects: false for webpack tree shaking (#6082 by @taylorc93)
v4.3.0-rc.2
Changes
- Bump
hoist-non-react-statics
for React 16.3. - Missing
generatePath
inreact-router-dom
package.
v4.3.0-rc.1
Changes
Mar 26, 2018
- Redirect with parameters (#5209 by @dlindenkreuz)
- Fix with missing pathname:
<Link to="?foo=bar">
(#5489 by @pshrmn) - Escape NavLink path to allow special characters in path. (#5596 by @esiegel)
- Expose
generatePath
(#5661 by @rybon) - Use named import of history module. (#5589 by @RoboBurned)
- Hoist dependencies for smaller UMD builds (#5720 by @pshrmn)
- Remove aria-current from navLink when inactive (#5508 by @AlmeroSteyn)
- Add invariant for missing "to" property on
<Link>
(#5792 by @selbekk) - Use Prettier on the code (e6f9017 by @mjackson)
- Fix pathless route's match when parent is null (#5964 by @pshrmn)
- Use history.createLocation in
<StaticRouter>
(#5722 by @pshrmn)
v3.2.1
v3.2.0
react-router-dom v4.2.2
Apologies for the quick rebuild. There was a bad UMD config, which would have required you to include both the react-router and react-router-dom UMD files. You should only have to include react-router-dom now, which is the same behavior as the npm package.
OK, I'm done for a bit... 😬
react-router-dom v4.2.1
This fixes a missing warning
dependency if you were installing just react-router-dom
. No other changes to the actual code.