// Available variables: // - Machine // - interpret // - assign // - send // - sendParent // - spawn // - raise // - actions // - XState (all XState exports) const increment = (context) => context.count + 1; const isNotMax = (context) => context.count < 3; const fetchMachine = Machine( { initial: "active", context: { count: 0 }, states: { active: { on: { INC: { actions: [assign({ count: increment }), "bellBusTrigger"], cond: isNotMax }, } } } });