Files
2025-07-01 10:53:26 +00:00

17 lines
308 B
JavaScript

// stores/counter.js
import { defineStore } from 'pinia'
export const useCounterStore = defineStore('counter', {
state: () => {
return { count: 20 }
},
// could also be defined as
// state: () => ({ count: 0 })
actions: {
increment (a) {
this.count = a
}
},
persist: true
})