File tree 2 files changed +22
-3
lines changed
2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -81,9 +81,12 @@ These snippets were made to speed up Vue 3 development. With it you can write bo
81
81
82
82
### Pinia
83
83
84
- | Snippet | Purpose |
85
- | -------- | --------------------------------------- |
86
- | ` pstore ` | Base code needed for a Pinia store file |
84
+ | Snippet | Purpose |
85
+ | ---------------------- | ------------------------------------------------------------ |
86
+ | ` pstore ` | Base code needed for a Pinia store file |
87
+ | ⚠️ ` pstore-composition ` | Base code needed for a Pinia store file with Composition API |
88
+
89
+ > Snippets with ⚠️ symbol are unreleased.
87
90
88
91
### Vue Router
89
92
Original file line number Diff line number Diff line change 18
18
" "
19
19
],
20
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
+ " \t import.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"
21
37
}
22
38
}
You can’t perform that action at this time.
0 commit comments