I am currently migrating some SwiftUI code from combine to the new observation framework and I want to know how I can I maintain debounce? Is there anyway to natively debounce from within the Observation framework?
I have tried combining Combine ~no pun intended~ with the Observation framework and it produces a slew of errors.
No, there is no debounce because the
Observermechanism is designed for the synchronous delivery of information.Debouncing involves a delay and therefore, by its very nature, is concerned with the asynchronous delivery of information. As such, debounce would be out-of-place in the
Observermechanism.Combineis for handling asynchronous messages and debounce is appropriate in that system.