XState xstate@6.0.0-beta.3
This beta adds eventless `always` transitions to `xstate/fsm` and changes how callback, observable, listener, and subscription actors process and report events sent to a parent. It also fixes event ordering for delayed events and prevents targetless reentering transitions from running entry behavior.
Users of `xstate/fsm` with string transition targets or string-returning transition functions must update those configurations; users of the affected actor types receive changed event processing and inspection/subscriber notifications.
Update FSM transition targets to object form and review separately stored configurations and transition functions before upgrading.
- 01Run the `@xstate/codemod` `string-targets` transform for inline FSM configurations.
- 02Manually review separately stored FSM configurations and transition functions that return strings.
import { createFSM } from 'xstate/fsm';
const machine = createFSM({
initial: 'checking',
states: {
checking: { always: { target: 'ready' } },
ready: {}
}
});
machine.initialState.value; // 'ready'# community_signal
How useful is this release to your stack?
Sign in with GitHub to cast your vote.
You’ll return to this release, then choose your vote.