Issue
I am mastering Kotlin coroutines and trying to figure out
1- what is hot flow and cold flow ?
2- what is the main difference between them?
3- when to use each one?
Solution
A cold stream does not start producing values until one starts to collect them. A hot stream on the other hand starts producing values immediately.
I would recommend to read below to understand hot and cold steams with usage:
https://developer.android.com/kotlin/flow/stateflow-and-sharedflow
Answered By - Balwinder SIngh
Answer Checked By - Dawn Plyler (JavaFixing Volunteer)