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
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,17 @@ machine.state = 1
60
60
61
61
Use `<-!` operator to try transition by `Event` rather than specifying target `State` ([Test Case](https://github.com/ReactKit/SwiftState/blob/6858f8f49087c4b8b30bd980cfc81e8e74205718/SwiftStateTests/StateMachineEventTests.swift#L54-L76)).
62
62
63
+
```swift
64
+
enumMyEvent: StateEventType {
65
+
caseEvent0, Event1
66
+
caseAnyEvent// create case=Any
67
+
68
+
init(nilLiteral: Void) {
69
+
self= AnyEvent
70
+
}
71
+
}
72
+
```
73
+
63
74
```swift
64
75
let machine = StateMachine<MyState, MyEvent>(state: .State0) { machine in
0 commit comments