Problem with getServerSideProps and react-redux and redux-persist #13784
Unanswered
antonioOrtiz
asked this question in
Help
Replies: 1 comment
-
Note: Using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am having a problem with my dispatchers not firing the reducer and not updating the state :
Figured I am not levering
getServerSideProps
correctly as the docs from next suggest, as well as this blog post.So before I go down a rabbit hole:
The point of react-redux is to have state anywhere in your app without having to prop-drill, or pass functions to a child to update the parent; And the point of using
getServerSideProps
, from the next docs:**
**
That being said am I wrong in thinking this will solve my problem of the redux dispatchers not having the reducer fire:
getServerSideProps
seems to be doing the same thing asmapStateToProps
and all the other redux stuff. Could someone help in explaining how this works with redux? Should I just addgetServerSideProps
to my profile page (that's the page not updating, the actions are not firing ) As I am not sure why certain state in my store is getting updated?Any help would be appreciated!
Beta Was this translation helpful? Give feedback.
All reactions