Patch Changes
-
c7927083
#1516 Thanks @davidkpiano! - Thesend
function returned from theuseService()
now can take two arguments (an event type and payload), to match the behavior of@xstate/react
version 0.x. -
db77623a
#1516 Thanks @davidkpiano! - Thesend
value returned from theuseService()
hook will now accept a payload, which matches the signature of thesend
value returned from theuseMachine()
hook:const [state, send] = useService(someService); // ... // this is OK: send('ADD', { value: 3 }); // which is equivalent to: send({ type: 'ADD', value: 3 });
-
93f6db02
#1594 Thanks @Andarist! - Fixed an issue with internalsetState
inuseService
being called with 2 arguments instead of 1. -
72b0880e
#1504 Thanks @Andarist! - Fixed issue withuseService
returning an initial state for services in their final states.