Lovely to see updated inspector being released! I have looked into trying to add this on to my @xstate/react machines and contexts that are using createActorContext and I can't seem to get them to work after adding in {inspect: inspector.inspect} into the createActorContext function. Is there something else you have to do to get this to work? It seems to work fine with createActor from the usual xstate package but not xstate/react.
import { createActorContext } from "@xstate/react";
import { createBrowserInspector } from '@statelyai/inspect';
const inspector = createBrowserInspector();
const actorContext = createActorContext(stateMachine, {inspect: inspector.inspect}); // Error is highlighted here also: Type 'Observer<InspectionEvent>' is not assignable to type 'Observer<InspectionEvent> | ((inspectionEvent: InspectionEvent) => void) | undefined'.
Hiya,
Lovely to see updated inspector being released! I have looked into trying to add this on to my @xstate/react machines and contexts that are using createActorContext and I can't seem to get them to work after adding in
{inspect: inspector.inspect}
into the createActorContext function. Is there something else you have to do to get this to work? It seems to work fine with createActor from the usual xstate package but not xstate/react.