Skip to Content

setRootScope()

Stores a value in the shared reactive root scope.

The root scope is a MobX observable object that lives on the ARM instance, making it a lightweight global state store accessible from any component that has access to ARM.

Kind: global function

ParamTypeDescription
rootScopePropertystringThe property name to set (supports dot notation).
rootScopeValue*The value to store.

Example

ARM.setRootScope('currentUser', { id: 1, name: 'Alice' }) ARM.setRootScope('ui.sidebarOpen', true)
Last updated on