File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Expand file tree Collapse file tree 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
8181
8282### Pinia
8383
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.
8790
8891### Vue Router
8992
Original file line number Diff line number Diff line change 1818 " "
1919 ],
2020 "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"
2137 }
2238}
You can’t perform that action at this time.
0 commit comments