Feature request description
React hooks do not allow StateSchema generic types to be passed and always pass any to StateMachine
Current Behaviour
StateSchema is always typed to any in useMachine and useService hooks, resulting in the state object coming back as not being typed.
Expected Result
A generic type to be exposed by the hooks for the StateSchema
Reproduction
Typestates don't use the StateSchema. Please see https://codesandbox.io/s/floral-shadow-8qoy3?file=/src/index.tsx
The StateSchema is only useful for constructing the machine, and that information is not needed after the machine is constructed.
Thanks @davidkpiano. That's what I was looking for.
Most helpful comment
Thanks @davidkpiano. That's what I was looking for.