- You can install by finding the
Pinia VS Code Snippets
bymnenie
extension. - Or go VS Code Extensions Marketplace and click install.
Snippet | Purpose |
---|---|
pinia-dsc , dsc |
Pinia Store Base with the Composition API |
pinia-dso , dso |
Pinia Store Base with the Options API |
import-store , imps |
Import Pinia Store |
import-store-to-refs , imstr |
Import Pinia storeToRefs() |
pinia-script-setup , pss |
Pinia Composition API - Using script setup |
pinia-setup , ps |
Pinia Store - Using setup() |
pinia-subscribe , ps$subscribe |
Pinia State Subscription with $subscribe |
pinia-patch , ps$patch |
Pinia State Mutation with $patch |
pinia-action-sub , on-action , ps$onAction |
Pinia Action Subscription with $onAction |
map-state , ms |
Pinia mapState() - Usage in Options API" |
map-writable-state , mws |
Pinia mapWritableState() - Usage in Options API |
map-actions , ma |
Pinia mapActions() - Usage in Options API |
This is an open source project open to anyone. Contributors are welcome on GitHub.
If you are contributing a snippet, please be sure to add the documentation for it in the tables in the README
, the pull request cannot be accepted without this addition. Thanks!