Skip to content

Commit

Permalink
Merge pull request #19 from sideeffect-io/feature/debounce-in-readme
Browse files Browse the repository at this point in the history
project: improve debounce example
  • Loading branch information
twittemb authored Aug 22, 2022
2 parents 7e3403a + be593c3 commit 54cfca6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,13 +381,18 @@ self.viewStateMachine.binding(send: .closeButtonWasPressed)
Allows to create a SwiftUI binding on a property of the current state, sending an Event when the binding changes.

```swift
self.viewStateMachine.binding(keypath: \.persons, send: .closeButtonWasPressed)
self.viewStateMachine.binding(
keypath: \.persons,
send: .closeButtonWasPressed
)
```

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.

```swift
self.viewStateMachine.binding(keypath: \.persons, send: .closeButtonWasPressed).debounce(for: .seconds(1))
self.viewStateMachine
.binding(send: .closeButtonWasPressed)
.debounce(for: .seconds(1))
```
</details>

Expand Down

0 comments on commit 54cfca6

Please sign in to comment.