forked from jsnbuchanan/crowd-funder-for-time-pwa
Added Pinia in addition to Vuex for state-management. Will migrate to Pinia eventually
This commit is contained in:
19
src/store/account.ts
Normal file
19
src/store/account.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
// @ts-check
|
||||
import { defineStore } from "pinia";
|
||||
|
||||
export const useAccountStore = defineStore({
|
||||
id: "account",
|
||||
state: () => ({
|
||||
firstName: "",
|
||||
lastName: "",
|
||||
}),
|
||||
|
||||
actions: {
|
||||
reset() {
|
||||
this.$patch({
|
||||
firstName: "",
|
||||
lastName: "",
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user