is StateFlow sticky? Do new consumers who call col...
# coroutines
k
is StateFlow sticky? Do new consumers who call collect receive the latest stored value?
👌 1
l
@kevin.cianfarini Yes. Isn't it mentioned in the documentation?
k
nothing is quite jumping out at me explicitly stating so. In fact this piece from the docs makes me think the opposite.
The flow of future updates to the value can be observed by collecting values from this flow.
specifically calling out future values
l
A
StateFlow
keeps its last value, and collectors always get the latest value.
k
awesome
u
Is there a publish relay analog?