xstate@5.0.0-beta.12
Pre-release
Pre-release
github-actions
released this
19 May 09:04
·
478 commits
to main
since this release
Major Changes
-
#3990
fe6db147a
Thanks @davidkpiano! - You can now add asystemId
to spawned actors to reference them anywhere in the system.const machine = createMachine({ // ... context: ({ spawn }) => ({ actorRef: spawn( createMachine({ // ... }), { systemId: 'actorRef' } ) }) });
-
#3991
98db493e4
Thanks @davidkpiano! - Theactor.onDone(...)
method is removed. Useactor.subscribe({ complete() {... } })
instead.- actor.onDone(() => { ... }) + actor.subscribe({ + complete() { + // ... + } +})