Working with Subjects in Combine
In this blog post, we explore the concept of subjects in the Combine framework. We’ll look at two types provided by Apple: CurrentValueSubject and PassthroughSubject. We’ll explore their differences and when to use them. What are Subjects? Subject is a type of publisher in the Combine framework that adheres to the Subject protocol. It has a .send(_:) method that allows developers to send specific values to a subscriber. Subjects put values into a stream....