Skip to content
Discussion options

You must be logged in to vote

Here's a Redux example you can start with: https://github.com/vercel/next.js/tree/canary/examples/with-redux-toolkit

You probably don't want to (and can't) dispatch an action from getStaticProps, since it's run on the server (Node.js context). Instead, you're probably wanting to dispatch an action when the component first renders, yeah?

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@daveOnactive
Comment options

@ujjwal11
Comment options

Answer selected by daveOnactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants