Added Pinia in addition to Vuex for state-management. Will migrate to Pinia eventually

This commit is contained in:
Matthew Aaron Raymer
2022-12-01 17:43:43 +08:00
parent ba143dfccd
commit 3c388da22d
4 changed files with 91 additions and 1 deletions

19
src/store/account.ts Normal file
View 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: "",
});
},
},
});