Skip to content

@pinia/root / pinia / setActivePinia

setActivePinia()

Sets or unsets the active pinia. Used in SSR and internally when calling actions and getters

Param

Pinia instance

Call Signature

ts
function setActivePinia(pinia): Pinia

Parameters

pinia

Pinia

Returns

Pinia

Call Signature

ts
function setActivePinia(pinia): undefined

Parameters

pinia

undefined

Returns

undefined

Call Signature

ts
function setActivePinia(pinia): undefined | Pinia

Parameters

pinia

undefined | Pinia

Returns

undefined | Pinia

Released under the MIT License.