Skip to content

How to get the current redux state from getInitialProps ? #3041

@jackmatrix

Description

@jackmatrix

When i process a Router.push to redirect to another page, getInitialProps is called but without req, so my app can't process to the initial ajax request without these information.

To fix this, I need to store these info into redux and then pick them in case getInitialProps is unable to get req info.

How can i do this ?

Thanks

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