Minor Changes
-
#4863
0696adc21
Thanks @davidkpiano! - Meta objects for state nodes and transitions can now be specified insetup({ types: … })
:const machine = setup({ types: { meta: {} as { layout: string; } } }).createMachine({ initial: 'home', states: { home: { meta: { layout: 'full' } } } }); const actor = createActor(machine).start(); actor.getSnapshot().getMeta().home; // => { layout: 'full' } // if in "home" state