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

Pinia: The Enjoyable Vue Store

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

Pinia Plugins

In this lesson, we create a Pinia plugin to provide reusable undo/redo functionality for our stores. With Pinia plugins you are able do a wide variety of things including:

  • Adding custom properties
  • Adding custom methods
  • Watching the store’s state with dollar sign subscribe
  • Limiting the functionality to specific stores with a custom option
  • Implement side effects like local storage
  • Add new state
  • Add new actions/methods
  • Wrap existing actions/methods

Links