github statelyai/xstate xstate@4.28.0

2 years ago

Minor Changes

  • #2835 029f7b75a Thanks @woutermont! - Added interop observable symbols to ActorRef so that actor refs are compatible with libraries like RxJS.

Patch Changes

  • #2864 4252ee212 Thanks @davidkpiano! - Generated IDs for invocations that do not provide an id are now based on the state ID to avoid collisions:

    createMachine({
      id: 'test',
      initial: 'p',
      states: {
        p: {
          type: 'parallel',
          states: {
            // Before this change, both invoke IDs would be 'someSource',
            // which is incorrect.
            a: {
              invoke: {
                src: 'someSource'
                // generated invoke ID: 'test.p.a:invocation[0]'
              }
            },
            b: {
              invoke: {
                src: 'someSource'
                // generated invoke ID: 'test.p.b:invocation[0]'
              }
            }
          }
        }
      }
    });
  • #2925 239b4666a Thanks @devanfarrell! - The sendTo(actorRef, event) action creator introduced in 4.27.0, which was not accessible from the package exports, can now be used just like other actions:

    import { actions } from 'xstate';
    
    const { sendTo } = actions;

Don't miss a new xstate release

NewReleases is sending notifications on new releases.