cassiozen / useStateMachine

The <1 kb state machine hook for React
MIT License
2.38k stars 47 forks source link

Send should accept a payload #31

Closed cassiozen closed 3 years ago

cassiozen commented 3 years ago

Use case: forms or subscriptions The user wants to update the context with data coming from outside, like a form or a subscription. We don't want to expose the updater function to the outside world, so having send accept a payload and making it available to the updater function would be a solution.