Skip to content

Commit be593c3

Browse files
committed
project: improve debounce example
1 parent 7e3403a commit be593c3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -381,13 +381,18 @@ self.viewStateMachine.binding(send: .closeButtonWasPressed)
381381
Allows to create a SwiftUI binding on a property of the current state, sending an Event when the binding changes.
382382

383383
```swift
384-
self.viewStateMachine.binding(keypath: \.persons, send: .closeButtonWasPressed)
384+
self.viewStateMachine.binding(
385+
keypath: \.persons,
386+
send: .closeButtonWasPressed
387+
)
385388
```
386389

387390
Allows to create a SwiftUI binding on a property of the current state, sending an Event when the binding changes, debounced with the specified dueTime.
388391

389392
```swift
390-
self.viewStateMachine.binding(keypath: \.persons, send: .closeButtonWasPressed).debounce(for: .seconds(1))
393+
self.viewStateMachine
394+
.binding(send: .closeButtonWasPressed)
395+
.debounce(for: .seconds(1))
391396
```
392397
</details>
393398

0 commit comments

Comments
 (0)