Skip to content

xstate@5.0.0-beta.46

Pre-release
Pre-release
Compare
Choose a tag to compare
@Andarist Andarist released this 27 Nov 11:32
145cbf2

Major Changes

Minor Changes

  • #4480 3e610a1f3 Thanks @Andarist! - Children IDs in combination with setup can now be typed using types.children:

    const machine = setup({
      types: {} as {
        children: {
          myId: 'actorKey';
        };
      },
      actors: {
        actorKey: child
      }
    }).createMachine({});
    
    const actorRef = createActor(machine).start();
    
    actorRef.getSnapshot().children.myId; // ActorRefFrom<typeof child> | undefined

Patch Changes