The wildcard state

There can be more than just the two states that we defined for our trigger. In some cases, it makes more sense to apply transitions regardless of what state value we come from. For those cases, there is the wildcard state. Using the wildcard state is easy. You go to your transition definition and replace a state value with *, like so:

transition('* => larger')  

This means regardless of what state we were in before, a transition will happen when our state property assumes a larger value.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset