MachineRead
What read returns: the state, the context, and the wait.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Context |
Value |
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
context |
Context |
- |
secondsLeft |
number | undefined |
Seconds left in the current state’s wait; undefined where it has none. |
value |
Value |
- |
Methods
Section titled “Methods”matches()
Section titled “matches()”matches(
value):boolean
Whether it is in value or a state inside it, as XState’s
matches: "patrol" matches { patrol: "watch" }.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value |
StateValue |
Returns
Section titled “Returns”boolean