Closed brianlawasdf123 closed 6 years ago
Thank you very much for opening this issue @brianlawasdf123.
At the moment, actions don't receive any parameter because you can access those information through props or lifecycle hooks, but in the new version of this library that I'm currently writing I added the parameters to keep consistency with xstate
.
Stay tuned!
Hey @brianlawasdf123, v4 is out and now actions receive arguments.
Awesome! Thanks.
xstate shows an example of action methods receiving arguments
extState, event
http://davidkpiano.github.io/xstate/docs/#/api/actions?id=transitionactionsHowever, Component action methods don't seem to be receiving these arguments. Could they be added? https://github.com/MicheleBertoli/react-automata/blob/master/src/withStatechart.js#L78
Heres an example: https://codesandbox.io/s/0q7r7po9np