@yantrix/react v0.6.0 • Docs
Yantrix API / @yantrix/react / IYantrixBoundStore
Interface: IYantrixBoundStore<Snapshot> ​
External store bound to a single FSM instance. Used internally by useFSM.
Type Parameters ​
• Snapshot = TAutomata
Properties ​
callbacks ​
ts
callbacks: Map<number, TListenerCallback>;callbacksIdCounter ​
ts
callbacksIdCounter: number;changeState() ​
ts
changeState: () => void;Returns ​
void
getSnapshot() ​
ts
getSnapshot: () => Snapshot;Returns ​
Snapshot
subscribe() ​
ts
subscribe: (listener) => IUnsubscribe;Parameters ​
• listener: TListenerCallback