Combine 101 – discussing the basics
Combine
is a framework introduced in iOS 13, and it brings a native approach to reactive programming. Before iOS 13, if you wanted a reactive framework, you used RxSwift, ReactiveCocoa, or others. You may be familiar with reactive programming either from Swift or another programming language. Reactive programming typically has a higher learning curve, but I think Apple has done an excellent job of simplifying the topic.
If you are new to reactive programming, you are probably asking why you should learn Combine
. Using Combine
helps you with synchronous and asynchronous tasks. For example, let's say you have a sign-up form. You typically have a username, two password fields, and a Submit button. Let's say that your usernames are unique, and you need to verify that any new usernames don't already exist. The username will need to check the server to verify, and with passwords, you want to check that both passwords match. While...