Releases: danielr18/connected-next-router
Releases · danielr18/connected-next-router
5.0.0
Breaking Changes
-
The initial state will be initialized empty if the initial URL is not provided. When using the hook version of next-redux-wrapper, the make store function doesn't receive the URL (See kirill-konshin/next-redux-wrapper#554)
{ pathname: '', search: '', hash: '', href: '', }
If the initial URL is not provided when creating the store, the location can be set after hydration like this:
const {store, props} = reduxWrapper.useWrappedStore(rest); useEffect(() => { Router.ready(() => { store.dispatch(onLocationChanged(locationFromUrl(Router.asPath))); }); }, [store]);
Changes
- Adds support for Next.js 13 or newer
- Add support for next-redux-wrapper 8
4.2.0
4.1.1
4.0.1
4.0.0
Breaking Changes
- Removed history action from Redux location state. This was added to keep compatibilty with
connected-react-router
, but the implementation was hacky and was the typical cause of breaks with Next.js upgrades.
Changes
- Adds support for Next.js 10 or newer
- Ensures the Redux location state and Next router state are in sync on page load