Summary
Introducing state management into your application can really help you handle your data with ease. In the two examples that we shared in this chapter, we saw the benefit that state management can add to your application by avoiding prop drilling and event bubbling.
Before we conclude this chapter, I want to share one more benefit of using state management in your application. The refactor that we have accomplished in the previous two sections highlights the fact that using the Pinia store helped us remove lots of logic from the components to a single location within the store file.
This abstraction is not only good for a development experience but can also be used to choose which parts of our application can be unit tested. You may remember from Chapter 8 that choosing what to test is quite complicated, as there is a very fine line between testing too much and testing too little. I personally use state management to delineate which parts of the application I will unit...