github statelyai/xstate @xstate/store@3.3.0

20 hours ago

Minor Changes

  • #5215 13279166ed9fa3d3626a2129bd257f6cd663fd0e Thanks @davidkpiano! - Added store.transition(state, event) method that returns the next state and effects for a given state and event as a tuple, without actually updating the store. This is useful for computing state changes before committing them, or controlling the execution of effects.

    Example:

    const [nextState, effects] = store.transition(store.getSnapshot(), {
      type: 'increment',
      by: 1
    });

Don't miss a new xstate release

NewReleases is sending notifications on new releases.