Centralized sidebar state management with Pinia
In the previous section, we introduced the basic structure and syntax of Pinia. To better learn and understand state management, we are going to modify our Companion App by refactoring some of the existing data into its own store. We are going to implement two different stores. The first is going to be a very simple store that will manage the state of the sidebar, while the second is going to handle posts.
The store that handles the sidebar state is going to be quite small. It will be perfect for us to understand the basic syntax and usage of the store, while the one that handles posts is going to be a little more complex.
State management should not be used for all data, and its addition should be accompanied by a good reason that supports its use. So, is it right to add it on the sidebar?
Do your research
Go back to the code base and try to understand everything you can about the sidebar and how it functions. Exploratory...