# xstate/release
XState @xstate/codemod@0.1.0-beta.3
importance: highbreakingmigrationfeatureprerelease
This release updates the codemod package alongside xstate@6.0.0-beta.3. Its notes describe a breaking `xstate/fsm` transition API change, add eventless `always` transitions, and provide a codemod transform to update inline FSM configurations.
affected
Users of `xstate/fsm` configurations or transition functions that use string targets or return strings are affected.
action
Apply the `string-targets` codemod to inline FSM configurations and manually review separately stored configurations and transition functions.
release_signals
-In `xstate/fsm`, `on` and `always` transition targets must now be objects, such as `{ target: 'ready' }`, rather than strings. Transition functions must return an object or `undefined`; `initial: 'idle'` remains unchanged.
+`xstate/fsm` supports eventless `always` transitions during initialization and after handled events until no eventless transition is enabled.
migration_steps2 steps
- 01Run the `@xstate/codemod` `string-targets` transform to update inline FSM configurations.
- 02Review separately stored configurations and functions returning strings manually.
code_snippet
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?
—
net score
Sign in with GitHub to cast your vote.
Sign in with GitHub to vote
You’ll return to this release, then choose your vote.