tokopedia / RxComposableArchitecture

RxComposableArchitecture is a forked of Composable Architecture with adjustment to make it work with UIKit.
Apache License 2.0
31 stars 5 forks source link

Implement Throttle #24

Closed jeffersonsetiawan closed 2 years ago

jeffersonsetiawan commented 2 years ago

https://github.com/pointfreeco/swift-composable-architecture/blob/main/Sources/ComposableArchitecture/Effects/Throttling.swift

wendyliga commented 2 years ago

@jeffersonsetiawan what's the difference with this one https://github.com/tokopedia/RxComposableArchitecture/blob/main/Sources/RxComposableArchitecture/Effects/Deferring.swift?

jeffersonsetiawan commented 2 years ago

@jeffersonsetiawan what's the difference with this one https://github.com/tokopedia/RxComposableArchitecture/blob/main/Sources/RxComposableArchitecture/Effects/Deferring.swift?

Deferred will Returns an effect that will be executed after given dueTime.

Throttle will emit the value first, and discard any new emited value within the interval time range

wendyliga commented 2 years ago

cool maybe we can also introduce this to TCA too.

jeffersonsetiawan commented 2 years ago

cool maybe we can also introduce this to TCA too.

I implement the throttle based on the original TCA throttle wen kwkwk