next.js doesn't server side render redux state (next-redux-wrapper) #16044
Replies: 2 comments 6 replies
-
remove redux-persist, it will work. redux-persist persists data with localStorage so when you add it your data will only be available on the client side |
Beta Was this translation helpful? Give feedback.
-
it's a bit tricky. i wanted to suggest you do everything on the client side but since it looks like an e-commerce app i guess you will need SEO for this page. my suggestion would be to display the brand and categories on the server side and when the user clicks on the filter you can redirect to another page which will not use SSR, and you can request to fetch filters through queries which will be sent |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the problem
I am using next-redux-wrapper to sync server redux state with client. After dispatching action in
getServerSideProps
, client state is updated and data is rendered. But with disabled js in the browser, the data is not rendered.To Reproduce
store.js
_app.js
page
Expected behavior
After dispatching redux action in
getServerSideProps
, next should render fetched data in the server, but it is rendered on the client side after syncing storage.Screenshots
with javascript enabled:

with javascript disabled:

Beta Was this translation helpful? Give feedback.
All reactions