Skip to content

Commit 54cfca6

Browse files
authored
Merge pull request #19 from sideeffect-io/feature/debounce-in-readme
project: improve debounce example
2 parents 7e3403a + be593c3 commit 54cfca6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
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)