Skip to content

@pinia/root / pinia / getActivePinia

getActivePinia()

ts
function getActivePinia(): undefined | Pinia

Get the currently active pinia if there is any.

Returns

undefined | Pinia

Released under the MIT License.