Skip to content

Multiple pages Redux state management - How to? #424

@YarivGilad

Description

@YarivGilad

Hi,
I'm trying to figure out how to adjust to the next.js paradigm.
Coming from react-router, you would have an index.js where you would wrap the router with a to inject the redux store, and from there on, each container could reference the store using the Connect method of react-redux.
Since there is no react-router single instance when using next.js, but instead you simply define the main containers in the 'pages' folder - how would you create the store in one place and reference it from all containers?
The redux example on the Next.js Wiki demonstrate a single counter component...
How would you tackle multiple pages needing to reference the same store?
Cheers
Ajar

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions