github statelyai/xstate xstate@5.0.0-beta.47

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

Minor Changes

  • #4488 9ca3c3dcf Thanks @davidkpiano! - The spawn(...) action creator has been renamed to spawnChild(...) to avoid confusion.

    import { spawnChild, assign } from 'xstate';
    
    const childMachine = createMachine({
      on: {
        someEvent: {
          actions: [
            // spawnChild(...) instead of spawn(...)
            spawnChild('someSrc'),
    
            // spawn() is used inside of assign()
            assign({
              anotherRef: ({ spawn }) => spawn('anotherSrc')
            })
          ]
        }
      }
    });
  • #4488 9ca3c3dcf Thanks @davidkpiano! - The stop(...) action creator is renamed to stopChild(...), to make it clear that only child actors may be stopped from the parent actor.

Don't miss a new xstate release

NewReleases is sending notifications on new releases.