Skip to main content
Access via:io.v2.current

API for retrieving and tracking the currently active Global Layout.

3 Methods

get()⚓︎

() => Promise<CurrentLayoutState | null>

Retrieves the state of the currently active Global Layout. Resolves with null if there isn't a currently active Global Layout.

onChanged()⚓︎

(handler: (state: CurrentLayoutState | null) => void) => Promise<UnsubscribeFunction>

Notifies when a different Global Layout becomes the current one, or when there is no longer a current Global Layout. Resolves with an unsubscribe function.

Parameters (1)

Name Type Required Description
handler⚓︎ (state: CurrentLayoutState | null) => void

Callback function for handling the event. Receives the state of the current Global Layout, or null.

onModified()⚓︎

(handler: (event: LayoutModifiedEvent) => void) => Promise<UnsubscribeFunction>

Notifies when the current Global Layout is modified (e.g., an app has been started or closed). Resolves with an unsubscribe function.

Parameters (1)

Name Type Required Description
handler⚓︎ (event: LayoutModifiedEvent) => void

Callback function for handling the event.