Top "Combine" questions

Combine is Apple's declarative Swift API for processing values over time.

What does the dollar sign do in this example?

This tutorial by Apple about SwiftUI uses a dollar sign to bind data, and I‘m having trouble finding more …

swift swiftui combine
An equivalent to computed properties using @Published in Swift Combine?

In imperative Swift, it is common to use computed properties to provide convenient access to data without duplicating state. Let's …

ios swift swiftui reactive combine
Best data-binding practice in Combine + SwiftUI?

In RxSwift it's pretty easy to bind a Driver or an Observable in a View Model to some observer in …

ios swift swiftui rx-swift combine
SwiftUI: Random "Extra argument in call" error

So I'm trying to learn SwiftUI and Combine. I usually start new tech by making a simple tip calculator. I …

swiftui combine
Combine: how to replace/catch an error without completing the original publisher?

Given the following code: enum MyError: Error { case someError } myButton.publisher(for: .touchUpInside).tryMap({ _ in if Bool.random() { throw MyError.…

ios swift combine
SwiftUI: How can I catch changing value from observed object when I execute function

I have a problem with observed object in SwiftUI. I can see changing values of observed object on the View …

ios swiftui combine observableobject observedobject
How to observe a TextField value with SwiftUI and Combine?

I'm trying to execute an action every time a textField's value is changed. @Published var value: String = "" var body: some …

ios swiftui combine