Preserve API calls between multiple pages using getServerSideProps and redux #14866
Unanswered
gurmeetsinghmalhotra
asked this question in
Help
Replies: 0 comments
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 have a redux store in place to share common data between pages. I am using getServerSideProps, since it runs every time on server irrespective of the fact that the page is refreshed or it is client side navigated.
How can I save few API hits on client side for which I already have data in the redux store? What check shall I place in getServerSideProps to avaoid an API hit? As new store is always created at the server. Shall I switch back to getInitialProps?
Beta Was this translation helpful? Give feedback.
All reactions