Skip to content

@pinia/root / pinia / getActivePinia

getActivePinia() ​

ts
const getActivePinia: () => Pinia | undefined;

Get the currently active pinia if there is any.

Returns ​

Pinia | undefined

Released under the MIT License.