Skip to content

Initializing nested component props on server side #1124

@jlabarbera11

Description

@jlabarbera11

I'm using next.js with redux, I have a component (table) that I'm populating via an API call that I'd like to be done on the server-side. I've looked at the with-redux example, which relies on the fact that the page by itself can populate the store in getInitialProps. However, I'd like to abstract that away from the page that contains the table, as I don't think the page should have such responsibility. I'd also like to avoid cascading getInitialProps() calls. Is there a way to accomplish this with nextjs, or does it go against convention? It seems like redux-connect can solve my problem, but I'm unsure of how to integrate it into the project.

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