'What is the best way to manage states in a multi-page nextjs-based website?

Supposing that I have a website with 10 pages based on nextjs framework. Each of these pages has some states which should be managed using a state manager. Should I use a single global state manager for the whole application or 10 local state managers which handle the states of each page separately? Which one of these choices is the best practice in case of performance and/or code maintenance? Any other suggestion for this problem is also appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source