github statelyai/xstate xstate@5.30.0

5 hours ago

Minor Changes

  • #5493 871857d Thanks @davidkpiano! - Add a filterEvents option to xstate/graph traversal helpers and
    createTestModel(...) to control which events should be explored from each
    state.

    This makes it possible to opt into enabled-only traversal for machine snapshots,
    such as when you only want to explore events that currently pass guards:

    import { createTestModel } from 'xstate/graph';
    
    const model = createTestModel(machine);
    
    const paths = model.getSimplePaths({
      filterEvents: (state, event) => state.can(event)
    });

Don't miss a new xstate release

NewReleases is sending notifications on new releases.