Learning about the structure of a Pinia store
In this chapter, we are going to cover what makes up a Pinia store and how it can be used to support you in managing the data of your application. Pinia is built on the notion of multiple stores. Each individual store is going to manage a specific set of data or company logic that is not bound to a specific component. Your application could have a store for posts, a store for comments, and even a store to manage the state of the sidebar.
Stores can talk with each other, but what matters the most is that you should be able to easily define what makes a single store. The stores’ data should be split well.
Each store is divided into three different sections: state, getters, and actions.
These three sets of options that are available within a Pinia store can actually compare to existing features that we have learned about regarding Vue Single-File Components.
The state object defined in Pinia is comparable to Ref or Reactive...