UNPKG

react-robot

Version:

React hooks for Robot finite state machines

12 lines (11 loc) 343 B
declare module 'react-robot' { import type {Machine, SendFunction, Service, GetMachineTransitions} from 'robot3'; export function useMachine<M extends Machine>( machine: M, initialContext?: M['context'] ): [ M['state'] & {context: M['context']}, SendFunction<GetMachineTransitions<M>>, Service<typeof machine> ]; }