We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Pinia
1 parent 9c7b7c2 commit fb4e1f0Copy full SHA for fb4e1f0
snippets/pinia.code-snippets
@@ -18,5 +18,21 @@
18
""
19
],
20
"description": "Base code needed for a Pinia store file"
21
+ },
22
+ "Pinia Store Base - Composition API": {
23
+ "prefix": "pstore-composition",
24
+ "body": [
25
+ "import { defineStore, acceptHMRUpdate } from \"pinia\"",
26
+ "",
27
+ "export const use${TM_FILENAME_BASE/(.*)/${1:/capitalize}/}Store = defineStore(\"$TM_FILENAME_BASE\", () => {",
28
+ "\t${0}",
29
+ "})",
30
31
+ "if (import.meta.hot) {",
32
+ "\timport.meta.hot.accept(acceptHMRUpdate(use${TM_FILENAME_BASE/(.*)/${1:/capitalize}/}Store, import.meta.hot))",
33
+ "}",
34
+ ""
35
+ ],
36
+ "description": "Base code needed for a Pinia store file with Composition API"
37
}
38
0 commit comments