Next.js Discord

Discord Forum

SSR Auth, fetching and setting auth user to the state inside App.getInitialProps causes an error whe

Unanswered
Hilsa shad posted this in #help-forum
Open in Discord
Hilsa shadOP
Hi guys, I need to upgrade my project from Next.js version 12 to 14. I’m having issues with the next-redux-wrapper library, specifically the same issue described in the GitHub issue: https://github.com/kirill-konshin/next-redux-wrapper/issues/522 I have updated the next-redux-wrapper library to the latest version, 8.1.0. I also found discussions and comments stating that this issue was resolved with the prerelease version 9.0.0-rc.1(https://github.com/kirill-konshin/next-redux-wrapper/pull/523), but the problem still persists. Has anyone had a similar problem? Is there a solution for this library issue? If there is no solution for this library issue, as it seems fixes are awaited, is there an alternative solution for using Redux store?

To be precise:
The solution with wrapper.useHydration(props); will not perform rendering on SSR in Layout if getLayout is used for Per-Page Layouts(https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts#per-page-layouts).

Additionally, I want to continue using the pages router, as migrating to the app router requires significant effort and time because it is a huge web application

0 Replies