I've been using createActorContext and it is really brilliant overall. It simplifies a lot of the context boilerplate and works really well.
Unfortunately, I have been having some issues with the types from the useSelector hook returned from the context. For some reason, the state is defined as never when using it as follows
const count = SomeMachineContext.useSelector((state) => state.context.count);
Adding the type explicitly to the state seems to resolve the issue, but this should be inferring I believe. It's a little annoying having to manually type this everywhere we are using useSelector.
const count = SomeMachineContext.useSelector((state: StateFrom<typeof machine>) => state.context.count);
I can't share the actual code as it is a private repro, but in a very minimal example it seems like the inference is working.
I'm not sure what could be breaking the inference, but has anyone also experienced this issue?