Overview Version History Q & A Rating & Review
Pinia VS Code Snippets
Installation
Snippets
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
Contributing
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!