Skip to main content

subscribe

FitFileViewer - API Documentation v30.0.1


FitFileViewer - API Documentation / utils/state/core/stateManager / subscribe

Function: subscribe()

subscribe(path: string, callback: StateListener): Unsubscribe

Defined in: utils/state/core/stateManager.ts:613

Subscribes to state changes for a specific path.

Parameters​

path​

string

Dot-notation state path.

callback​

StateListener

Listener called when the path changes.

Returns​

Unsubscribe

Unsubscribe function.