Next.js Discord

Discord Forum

global state management

Unanswered
American black bear posted this in #help-forum
Open in Discord
American black bearOP
Can anyone share me some opinions on best practices for global state management in next js ? I have one app under progress I want to know best option. I know redux toolkit and react context but need your input

1 Reply

it all depends of how complex does your state management need to be. if it's something simple like sharing one state variable across multiple pages just use context. if instead you're building a complex dashboard that has a lot of data coming in and out I'd suggest taking a moment to understand how Redux/Zustand/and co. work and use one of then since they give you some really nice features right out of the box. something that would probably take you a long time to implement on your own with context