Flow Basics in Shared Code
Emit a stream of values from commonMain.
Streams of Values
A suspend function returns one value, then it is done. A Flow is different: it emits a whole stream of values over time, one after another. 🌊
Cold by Default
A Flow is cold: the code inside it does nothing until someone starts collecting. No collector means no work, which keeps your shared code lazy and cheap.
All lessons in this course
- Flow Basics in Shared Code
- StateFlow for Shared UI State
- Operators: map, filter, combine
- Collect Flows on Android & iOS