next-redux-wrapper

Redux wrapper for Next.js

MIT License

Downloads
806.2K
Stars
2.7K
Committers
49

Bot releases are visible (Hide)

next-redux-wrapper - 9.0.0-rc.2 Latest Release

Published by kirill-konshin over 1 year ago

Removed actionsFilter, serializeAction and deserializeAction. Instead, we now have serialize and deserialize methods, that receive full array of actions from each lifecycle method, and user has full control over filtering and serialization.

Full Changelog: https://github.com/kirill-konshin/next-redux-wrapper/compare/9.0.0-rc.1...9.0.0-rc.2

next-redux-wrapper - 9.0.0-rc.1

Published by kirill-konshin over 1 year ago

Replaced HYDRATE action with actions replayed on client.

What's Changed

New Contributors

Full Changelog: https://github.com/kirill-konshin/next-redux-wrapper/compare/8.1.0...9.0.0-rc.1

next-redux-wrapper - 8.0.0

Published by kirill-konshin about 2 years ago

Hook-based implementation

next-redux-wrapper - 8.0.0-rc.1

Published by kirill-konshin almost 3 years ago

Hook-based component instead of class-based

next-redux-wrapper - 7.0.5

Published by kirill-konshin about 3 years ago

Proper type fix for issue #412

next-redux-wrapper - 7.0.4

Published by kirill-konshin about 3 years ago

Remove deprecated UNSAFE_componentWillReceiveProps #380

next-redux-wrapper - 7.0.3

Published by kirill-konshin about 3 years ago

Fixed type issue #412

next-redux-wrapper - 7.0.2

Published by kirill-konshin over 3 years ago

Removed console.log

next-redux-wrapper - 7.0.1

Published by kirill-konshin over 3 years ago

Fixed issue #378 when initialProps from getInitialPageProps were not unwrapped.

next-redux-wrapper - 7.0.0

Published by kirill-konshin over 3 years ago

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

next-redux-wrapper - 7.0.0-rc.2

Published by kirill-konshin over 3 years ago

Fixed hot reload

next-redux-wrapper - 7.0.0-rc.1

Published by kirill-konshin almost 4 years ago

Add support for Redux Toolkit and some type enhancements

next-redux-wrapper - 6.0.2

Published by kirill-konshin over 4 years ago

Fix async in getServerSideProps

next-redux-wrapper - 6.0.1

Published by kirill-konshin over 4 years ago

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

next-redux-wrapper - 6.0.0

Published by kirill-konshin over 4 years ago

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.

next-redux-wrapper - 5.0.0

Published by kirill-konshin over 4 years ago

  • 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';
next-redux-wrapper - 4.0.1

Published by kirill-konshin about 5 years ago

Fix #156 incorrect path to sources

next-redux-wrapper - 4.0.0 Next.js 9

Published by kirill-konshin about 5 years ago

  • Next.js 9 types support
  • Optimized passing store on client side
  • Yarn
next-redux-wrapper - 3.0.0

Published by kirill-konshin about 5 years ago

  • 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
Package Rankings
Top 0.87% on Npmjs.org
Badges
Extracted from project README
npm version Coverage Status