Is there a way to execute an action when transitioning between specific states in Machina.js?
For example, say I have states "A, B, C".
I want to write a function like:
when("A", "C", function(){ console.log("Caught transition from A to C! Yay!"); }
This is in the same spirit as Akka's FSM implementation. Is this possible?
Thank you!
Figured it out. One just has to watch for
transition
event. See API doc here.