Skip to content

@pinia/root / pinia / getActivePinia

getActivePinia()

ts
function getActivePinia(): Pinia | undefined;

Get the currently active pinia if there is any.

Returns

Pinia | undefined

Released under the MIT License.