Avatar
APIClient で Combine.Publisher を使った I/F を作ろうとしてるんですが、みなさん Error はどうやって伝えてるんですかね?ベストプラクティスとかあれば教えて欲しいです! 普通に AnyPublisher<Response, Error> などで返してしまうと一度通信失敗とかで途絶えると動かなくなってしまうのかなと思っていて。 Result なり、Rx の materialize ぽいものなりで <Value, Never> に置き換えるのが良いんですかねー。 https://stackoverflow.com/questions/64444966/swift-combine-sink-stops-receiving-values-after-first-error https://www.apeth.com/UnderstandingCombine/operators/operatorsTransformersBlockers/operatorsflatmap.html https://github.com/CombineCommunity/CombineExt#materialize
Im moving my project to Combine from RxSwift I have a logic where I want publisher to emit event every time I click button. Acrually clicking button executed pushMe.send() pushMe .print...
CombineExt provides a collection of operators, publishers and utilities for Combine, that are not provided by Apple themselves, but are common in other Reactive Frameworks and standards. - GitHub -...