You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
XCTAssertEqual(machine.state, MyState.State2, "Event0 doesn't have 2 => Any")
94
97
```
95
98
96
99
If there is no `Event`-based transition, use built-in `NoEvent` instead.
97
100
101
+
### State & Event enums with associated values
102
+
103
+
Above examples use _arrow-style routing_ which are easy to understand, but it lacks in ability to handle state & event enums with associated values. In such cases, use `machine.addRouteMapping()` and pass either of the following closure types (_closure-style routing_):
This behaves very similar to JavaScript's safe state-container [rackt/Redux](https://github.com/rackt/redux), where `EventRouteMapping` can be interpretted as `Redux.Reducer`.
0 commit comments