StateHelper.object() method returns a
ObjectHelper instance which has a constantly-updated
data property that can be watched in frameworks like Vue or Angular.
The syntax to obtain the data object is as follows:
var helper = StateHelper.object(fsm); var data = helper.data;
Once you have your data object, you can pass it to whatever part of your app you need to have it watched for changes and update your UI.
See the Vue example for a much more detailed example, with:
- live output of the data object
- more advanced examples of wiring properties to HTML
- hooks into asynchronous transitions
- pausing and resuming