Skip to content

@pinia/root / pinia / getStores

getStores() ​

ts
function getStores(pinia): StoreGeneric[];

Get the stores that are currently in use by a pinia instance. Prefer this over the internal pinia._s: it returns a new array, so it's safe to dispose or create stores while iterating over it.

Parameters ​

pinia ​

Pinia

pinia instance

Returns ​

StoreGeneric[]

Released under the MIT License.