import { createContext } from 'react'; import { InterpreterFrom } from 'xstate'; import { depGraphMachine } from './machines/dep-graph.machine'; import { getDepGraphService } from './machines/dep-graph.service'; export const GlobalStateContext = createContext< InterpreterFrom >({} as InterpreterFrom); export const GlobalStateProvider = (props) => { const depGraphService = getDepGraphService(); return ( {props.children} ); };