Closed DevYeom closed 10 months ago
Add a new operator that sends elements only after a specified time interval elapses between events.
enum Debounce { case increment } func reduce(state: inout State, action: Action) -> AnyEffect<Action> { switch action { // ... case .debounce: return .just(.increment) .debounce(id: Debounce.increment, for: 0.5) case .debounceWithClock: return .just(.increment) .debounce(id: Debounce.increment, for: .seconds(1), clock: .continuous) // ... } }
Related Issues 💭
Description 📝
Add a new operator that sends elements only after a specified time interval elapses between events.
Additional Notes 📚
Checklist ✅