Skip to content

Update next-redux-wrapper from 6x to 7x #6

Description

@KristijanStosic

Can you update next redux wrapper to version 7x , it is a slighly different changes, but can you update it ?

This is official documentation for next-redux-wrapper libray:

Upgrade from 6.x to 7.x
Signature of createWrapper has changed: instead of createWrapper you should use createWrapper<Store>, all types will be automatically inferred from Store.

GetServerSidePropsContext and GetStaticPropsContext are no longer exported from next-redux-wrapper, you should use GetServerSideProps, GetServerSidePropsContext, GetStaticProps and GetStaticPropsContext directly from next.

All signatures like ({store, req, res, ...}) => { ... } were changed to store => ({req, res, ...}) => { ... } in order to keep Next.js internals free of modifications and for better typings support.

In version 7.x you have to manually wrap all getInitialProps with proper wrappers: wrapper.getInitialPageProps and wrapper.getInitialAppProps.

window.NEXT_REDUX_WRAPPER_STORE has been removed as it was causing issues with hot reloading

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions