xstate@5.0.0-beta.19
Pre-release
Pre-release
github-actions
released this
25 Jul 15:08
·
421 commits
to main
since this release
Major Changes
-
#4049
afc690046
Thanks @davidkpiano! - If context types are specified in the machine config, thecontext
property will now be required:// ❌ TS error createMachine({ types: {} as { context: { count: number }; } // Missing context property }); // ✅ OK createMachine({ types: {} as { context: { count: number }; }, context: { count: 0 } });
Minor Changes
-
#4117
c7c3cb459
Thanks @davidkpiano! - Actor logic creators now have access toself
:const promiseLogic = fromPromise(({ self }) => { ... }); const observableLogic = fromObservable(({ self }) => { ... }); const callbackLogic = fromCallback((sendBack, receive, { self }) => { ... }); const transitionLogic = fromTransition((state, event, { self }) => { ... }, ...);