Set up pinia
This commit is contained in:
parent
7ac29857ef
commit
160c8a626d
6 changed files with 74 additions and 1 deletions
12
gdn-app/src/stores/foo.ts
Normal file
12
gdn-app/src/stores/foo.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
|
||||
export const useFooStore = defineStore("foo", () => {
|
||||
const name = ref("foo");
|
||||
|
||||
function setName(to: string) {
|
||||
name.value = to;
|
||||
}
|
||||
|
||||
return { name, setName };
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue