Skip to content

5.0.0

Latest
Compare
Choose a tag to compare
@danielr18 danielr18 released this 04 Nov 16:38

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