Dynamic Page with persisted Redux #11175
Unanswered
vladfulgeanu
asked this question in
Help
Replies: 1 comment 1 reply
-
I don't think I quite understand what |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Thanks for an amazing library!
I'm new to next.js so I'm looking to start a discussion for what's the best way to solve this:
I'm using persisted redux using
next-redux-wrapper
with localStorage and until now most components connected to redux withmapStateToProps
and selected data usingreselect
.What I have now is a dynamic article page which should be SEO friendly but which can also show client specific info if the user is logged in like save article / article already saved.
getServerSideProps
when landing on the page, but when using transitions from other pages use the data that is already available in redux store (get articleId from query and use a selector for getting data and pass it to props withmapStateToProps
) and not let next.js make a new request like it is mentioned in the docs?1.1 Also if the user has already logged in and the data is persisted in localStorage, how can I get that data instead of making a new request on server side?
Beta Was this translation helpful? Give feedback.
All reactions