0

I need a state manager in the NextJS application, and I use Redux. But when using it, I have to use a next-redux-wrapper and everything seems very complicated. There are those who say that the next-redux-wrapper does not work well and have some flaws and problems. And that in general, when it comes to NextJS, then it is not really needed Redux and it is enough to use the context. But context has its own problems with its rerenders. Help me to understand.I'm completely confused. What actually to use as state manager for NextJS apps?

1 Answer 1

1

You can use Redux in a Next app without next-redux-wrapper. Here's an example from vercel https://github.com/vercel/next.js/tree/canary/examples/with-redux.

However, the next-redux-wrapper lets you avoid to instanciate the store every time you render on the server and other handy functionalities.

In conclusion, if you are using Next for a static application, a simple redux-toolkit configuration is enough, otherwise consider using next-redux-wrapper.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.