Skip to content

[email protected]

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 24 Nov 18:04
· 317 commits to main since this release
4b1c854

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.