Vue.js · Function
storeToRefs
storeToRefs() returns refs for a Pinia store’s reactive state and getters. It also includes reactive plugin state, but skips actions and non-reactive properties.
Last updated
Syntax
function storeToRefs<SS>(store: SS): StoreToRefs<SS>;In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
toRefs()defineStore()StoreToRefsPinia storesactions