Reactive Programming in iOS with Combine

Feb 4 2021 · Swift 5.3, macOS 11.0, Xcode 12.2

Part 2: Transforming & Filtering Operators

06. Introduction

Episode complete

Play next episode

Next
About this episode

Leave a rating/review

See forum comments
Cinema mode Mark complete Download course materials
Previous episode: Part 1 Quiz: Reactive Programming in iOS with Combine Next episode: 07. Transforming Operators

Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Learn more Already a subscriber? Sign in.

Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.

Now that you've learned what Combine is and how it will help you, it's time to dive right in to one of the biggest parts of Combine, operators. Up until now, you've subscribed to a publisher and taken whatever values it sends you unmodified, and worked with them as is. It turns out you can inject operators in between a publisher and subscribers to manipulate those incoming values in one or more ways before handing them off to subscribers. This means that operators are both publishers and subscribers. Each operator receives values from an upstream publisher, performs its operation on those values and then publishes them downstream, either to another operator or ultimately a subscriber. In other words, operators can be chained one after another until you're able to manipulate the values to your exact liking for subscribers. There are a multitude of operators in Combine, so it helps to organize them into categories based on their primary purposes, which is how you'll learn them in the rest of the course. First, you'll learn about transforming operators. You'll use this kind of operator the most to change the values coming in to something more useful to send downstream. Next, you'll learn how to use filtering operators to restrict which values get through. And by the end of this part of the course, you'll be well acquainted with a wide variety of operators in Combine, and you'll be prepared to learn about even more operators later in the course. Let's get started.