- Don't run listeners synchronously with history 3
b2c2259
- Support history 3 #476
- Makes sure the state in the store matches the state in history when using SSR #445
- Initialize currentLocation to initial location from the store. #403
- Added a UMD build. #362
- Calling routerReducer() with no args crashes. #350
- Fix IE8 compatbility. #344
This is a big breaking release, but the last one for the foreseeable future. The scope of this library has changed, so please re-evaluate its usefulness to you. You may not need it and this is ok!
The provided action creators and middleware are now separate from the history<->state syncing function. For the vast majority of cases, using action creators to trigger navigation is obsoleted by React Router's new history singletons provided in 2.0. Building this functionality in by default and coupling it to our history syncing logic no longer makes sense.
We now sync by enhancing the history instance to listen for navigation events and dispatch those into the store. The enhanced history has its listen method overridden to respond to store changes, rather than directly to navigation events. When this history is provided to <Router>, the router will listen to it and receive these store changes. This means if we time travel with the store, the router will receive those store changes and update based on the location in the store, instead of what the browser says. Normal navigation events (hitting your browser back/forward buttons, telling a history singleton to push a location) flow through the history's listener like normal, so all the usual stuff works A-OK.
Technically, 2.1.0 broke semver. The appropriate @timdorr's have been flogged. So, we're bumping the major version to catch up.
- Fixed Resets in Redux Dev Tools. 3ae8110f
- Ensure the initialState is set properly. a00acfd4
- Support any number of args on action creators 524898b5
listenForReplayshas aselectLocationStateselector. #218- Provide unscoped action creators. #225
- Example updated to use fully ES2015 syntax.
- Remove
historymodule published within the tarball. #133 - Make actions conform to Flux Standard Action. #208
Versions 2.0.0 and 2.0.1 were test releases for the 2.* series. 2.0.2 is the first public release.
A whole new API, with many breaking changes:
syncReduxAndRouteris gone. Instead, callsyncHistorywith just thehistoryobject, which returns a middleware that you need to apply. (#141)- If you use redux devtools, you need to call
middleware.listenForReplays(store)on the middleware returned fromsyncHistory. Create the store first with the middleware, then call this function with the store. - Action creators are now contained in a single object called
routeActions.go,goBack, andgoForwardaction creators have been added. UPDATE_PATHis nowUPDATE_LOCATION.- The fully parsed location object is now stored in the state instead of a URL string. To access the path, use
state.routing.location.pathnameinstead ofstate.routing.path.
- Only publish relevant files to npm
- Solve problem with
basenamecausing infinite redirects (#103) - Switched to ES6 imports/exports internally, but should not affect outside users
2015-12-09
This release changes quite a bit so you'll have to update your code.
Breaking Changes:
- The
updatePathaction creator has been removed in favor ofpushPathandreplacePath. UsepushPathto get the same behavior as before. (#38) - We have added support for routing state (#38)
- Our actions are now FSA compliant. This means if you are listening for the
UPDATE_PATHaction in a reducer you should get properties off thepayloadproperty. (#63)
Other fixes:
- Redux DevTools should now work as expected (#73)
- As we no longer depend on
window.location,<base href="...">should now work (#62) - We've done lots of work on finding the right way to stop cycles, so hopefully we shouldn't have any unnecessary location or store updates (#50)