#How would one include action parameters when sending and event?

1 messages · Page 1 of 1 (latest)

normal depot
#

I'm dealing with drag and drop that makes use of a "snap" feature. The snap calculation is done outside of react. When the function handling snapping fires, it sends the SNAP event which invokes the onSnap action. The only issue is that I need to pass a value to the onSnap action. How would one go about this?

thorny crown
#

You can send whatever you need to the onSnap action by attaching it to the event you’re sending to the state machine.