-
Code here (please open the console) It's like a drag 'n drop machine, but in the 'dragging' state we start an activity that listens for pointerup events that happen outside of a target element. When we leave the dragging state, the activity stops and the listener is removed. Is it possible to trigger the transition from dragging to idle inside the activity listener? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can use callback service for this - just send an event from it to the invoking machine so it can transition how you tell it to https://codesandbox.io/s/xstate-question-2suxj?file=/src/index.tsx |
Beta Was this translation helpful? Give feedback.
You can use callback service for this - just send an event from it to the invoking machine so it can transition how you tell it to
https://codesandbox.io/s/xstate-question-2suxj?file=/src/index.tsx