Skip to content

xstate@5.26.0

Choose a tag to compare

@github-actions github-actions released this 26 Jan 21:56
· 13 commits to main since this release
1710ace

Minor Changes

  • #5406 703c3a1 Thanks @davidkpiano! - Add getNextTransitions(state) utility to get all transitions available from current state.

    import { getNextTransitions } from 'xstate';
    
    // ...
    
    const state = actor.getSnapshot();
    const transitions = getNextTransitions(state);
    
    transitions.forEach((t) => {
      console.log(`Event: ${t.eventType}, Source: ${t.source.key}`);
    });