ActorOptions <TLogic>
Index
Properties
optionalclock
optionaldevTools
If true
, states and events will be logged to Redux DevTools.
Default: false
optionalid
The custom id
for referencing this service.
optionalinput
The input data to pass to the actor.
optionalinspect
A callback function or observer object which can be used to inspect actor system updates.
optionallogger
Type declaration
Specifies the logger to be used for log(...) actions. Defaults to the native console.log method.
Parameters
rest...args: any[]
Returns void
optionalsnapshot
Initializes actor logic from a specific persisted internal state.
optionalsrc
The source definition.
optionalstate
optionalsystemId
The system ID to register this actor under
The clock that is responsible for setting and clearing timeouts, such as delayed events and transitions.
You can create your own “clock”. The clock interface is an object with two functions/methods:
setTimeout
- same arguments aswindow.setTimeout(fn, timeout)
clearTimeout
- same arguments aswindow.clearTimeout(id)
By default, the native
setTimeout
andclearTimeout
functions are used.For testing, XState provides
SimulatedClock
.