From be593c3a60c007aa7e44c1e6c3f49b70741671fe Mon Sep 17 00:00:00 2001 From: Thibault Wittemberg Date: Mon, 22 Aug 2022 14:40:36 +0200 Subject: [PATCH] project: improve debounce example --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 51c2280..baee02f 100644 --- a/README.md +++ b/README.md @@ -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)) ```