Closed DzoYee closed 3 years ago
It seems the problem is that the defaultValue
of this context is set to the class DiagramEngine
What happens if you replace the createContext
call with this:
export const DiagramContext = React.createContext({
engine: createEngine(),
});
I want to create a contextProvider to pass around react-diagram paradigms such as engine but I'm running into some typescript errors. Any help would be greatly appreciated.