Setup Next.js with Redux 🔥

Next.js is awesome library for SSR(Server Side Rendering). We are developing our website with strapi and Next.js.
So, We wanted to use redux in Next.js project. Setup is easy but after redux setup, “getInitialProps” method stopped working for pages.
We did research on that and found out solution for it. Basically, we had to overwrite “App” component from Next.js.
To overwrite “App” component from Next.js, you would require to create “_app.js” file. Here it is.
And now, getInitialProps
method should call and you’ll get store in the method. Checkout index.js page.
Cool, now you you can leverage the power of redux and next.js both in our Next application.🔥🔥🔥
If you enjoyed reading this blog post, please click on the clap button below! ❤️👇
Follow RadicalLoop on Twitter, Facebook. 🚀