Skip to content

Releases: kirill-konshin/next-redux-wrapper

7.0.0

02 Jun 19:58
a16c1d5
Compare
Choose a tag to compare

Add support for Redux Toolkit and some type enhancements
Fixed hot reload

Migration guide: https://github.com/kirill-konshin/next-redux-wrapper#upgrade-from-6x-to-7x

7.0.0-rc.2

17 Apr 00:44
e2255c2
Compare
Choose a tag to compare
7.0.0-rc.2 Pre-release
Pre-release

Fixed hot reload

7.0.0-rc.1

12 Dec 03:43
Compare
Choose a tag to compare
7.0.0-rc.1 Pre-release
Pre-release

Add support for Redux Toolkit and some type enhancements

6.0.2

04 Jun 20:56
Compare
Choose a tag to compare

Fix async in getServerSideProps

6.0.1

01 Jun 23:28
Compare
Choose a tag to compare

Fixed issue with opting out of automatic static optimization despite not using getInitialProps in _app

6.0.0

11 May 21:14
76d9eb1
Compare
Choose a tag to compare

Support for getStaticProps and getServerSideProps.

Major change in the way how things are wrapped in version 6.

  1. Default export withRedux is marked deprecated, you should create a wrapper const wrapper = createWrapper(makeStore, {debug: true}) and then use wrapper.withRedux(Page).

  2. Your makeStore function no longer gets initialState, it only receives the context: makeStore(context: Context). Context could be NextPageContext or AppContext or getStaticProps or getServerSideProps context depending on which lifecycle function you will wrap. Instead, you need to handle the HYDRATE action in the reducer. The payload of this action will contain the state at the moment of static generation or server side rendering, so your reducer must merge it with existing client state properly.

  3. App should no longer wrap its children with Provider, it is now done internally.

  4. isServer is not passed in context/props, use your own function or simple check const isServer = typeof window === 'undefined' or !!context.req or !!context.ctx.req.

  5. store is not passed to wrapped component props.

  6. WrappedAppProps was renamed to WrapperProps.

5.0.0

20 Feb 23:10
fafd2c7
Compare
Choose a tag to compare
  • Added better TypeScript integration

Breaking changes

Old-style overrides were replaced with regular Next.js interfaces:

  • NextJSContext -> NextPageContext
  • NextJSAppContext -> AppContext

you can import them as usual:

import {NextPageContext, AppContext} from 'next';

4.0.1

04 Oct 23:46
08bd499
Compare
Choose a tag to compare

Fix #156 incorrect path to sources

4.0.0 Next.js 9

25 Sep 18:59
Compare
Choose a tag to compare
  • Next.js 9 types support
  • Optimized passing store on client side
  • Yarn

3.0.0

22 Aug 22:31
Compare
Choose a tag to compare
  • Typescript
  • ESLint
  • Breaking: setPromise not exported
  • Breaking: Store is no longer preserved between getInitialProps and render of WrappedApp. It will be always created twice, once with empty state and once with state received from getInitialProps