Vuex Store
In this example:
store/todos.js
stores state and mutations for our todo list.
pages/index.vue
imports the mapMutations
from the store and uses computed
properties and methods
to add and remove todos from the store.
Learn more in the Directory Structure book in the store chapter.
Loading CodeSandbox...