Minor Changes
-
d3da571:
xstate/graphexportsgetTransitionEntrySet(transition)andgetInitialStateNodes(stateNode).getTransitionEntrySet()returns the state nodes a transition enters, computed with the same rules XState uses when it takes the transition:import { getMicrosteps, initialTransition } from 'xstate'; import { getTransitionEntrySet } from 'xstate/graph'; const [snapshot] = initialTransition(machine); const [[, , [taken]]] = getMicrosteps(machine, snapshot, { type: 'SUBMIT' }); getTransitionEntrySet(taken).map((stateNode) => stateNode.id);
Resolved function transitions returned by
getMicrosteps()now carry thereentervalue the function returned.
Patch Changes
-
79f5475: Report actor failures at most once. A late subscription with an
errorcallback still receives the failure and can suppress a pending host report.When an actor has an
onUnhandledEventcallback, use it to report unhandled events in place of the default development warning. -
fc8933c: Use minutes, hours, and compound duration strings in XState delays and timeouts, such as
'60m','0.5h', and'1h10m10s'. Configured delay names still take precedence, and ISO 8601 durations still work.The default actor clock now supports delays and timeouts beyond the native timer limit of about 24.8 days, with cancellation across intervals.
-
0a10826: Reduce TypeScript checking cost for machines that declare large state contracts with
setup({ states }). -
7c4a438: Reject
undefinedinput at compile time when creating an actor whose logic requires input. -
fb6ae1e: Expand the v6 guides with runnable examples for context updates, cancellation, statecharts, and actor tests. Update the example project links and the Store links in the packaged documentation.