github statelyai/xstate xstate@5.0.0-beta.12

pre-release11 months ago

Major Changes

  • #3990 fe6db147a Thanks @davidkpiano! - You can now add a systemId to spawned actors to reference them anywhere in the system.

    const machine = createMachine({
      // ...
      context: ({ spawn }) => ({
        actorRef: spawn(
          createMachine({
            // ...
          }),
          { systemId: 'actorRef' }
        )
      })
    });
  • #3991 98db493e4 Thanks @davidkpiano! - The actor.onDone(...) method is removed. Use actor.subscribe({ complete() {... } }) instead.

    - actor.onDone(() => { ... })
    + actor.subscribe({
    +  complete() {
    +    // ...
    +  }
    +})

Don't miss a new xstate release

NewReleases is sending notifications on new releases.