github statelyai/xstate xstate@5.0.0-beta.17

latest releases: @xstate/vue@4.0.0, @xstate/store@2.6.1, @xstate/svelte@4.0.0...
pre-release16 months ago

Major Changes

  • #4127 cdaddc266 Thanks @Andarist! - IDs for delayed events are no longer derived from event types so this won't work automatically:

    entry: raise({ type: 'TIMER' }, { delay: 200 });
    exit: cancel('TIMER');

    Please use explicit IDs:

    entry: raise({ type: 'TIMER' }, { delay: 200, id: 'myTimer' });
    exit: cancel('myTimer');
  • #4127 cdaddc266 Thanks @Andarist! - All builtin action creators (assign, sendTo, etc) are now returning functions. They exact shape of those is considered an implementation detail of XState and users are meant to only pass around the returned values.

Patch Changes

  • #4123 b13bfcb08 Thanks @Andarist! - Removed the ability to configure transitions using arrays:

    createMachine({
      on: [{ event: 'FOO', target: '#id' }]
      // ...
    });

    Only regular object-based configs will be supported from now on:

    createMachine({
      on: {
        FOO: '#id'
      }
      // ...
    });

Don't miss a new xstate release

NewReleases is sending notifications on new releases.