State Flows and Shared Flows were introduced to broadcast events to multiple consumers with coroutines. You might have been using Broadcast Channels and are starting to migrate to Shared Flows. Or, you might be converting your RxJava code to Flows.
We’ll dive deep into the Shared & State Flow APIs. A Shared Flow provides you with ability to replay and cache events. How does it compare and map to existing RxJava constructs like publisher subjects? Or, how is it different from a Broadcast Channel? How do you handle back pressure? We’ll look into simple to complex use cases for migrating to Shared Flows and explore these questions in detail.