Learn Vue JS course Learn Javascript and Vue JS Learn VueJS course Learn VueJS Tutorial

Pinia: The Enjoyable Vue Store

Subscribe to the State thumbnail image

Get access to the most comprehensive Vue.js video library in the world. Over 300 video lessons including the newest Vue 3 features.

Subscribe to the State

In this lesson, we utilize the Pinia $subscribe method to keep watch on the cartStore’s state in order to power a undo/redo feature for our Pineapple stand.

Using $subscribe, we can enact side effects for our Vue.js applications whenever the state of a particular store changes.