Is it normal that `collectAsState` has some small ...
# compose
f
Is it normal that
collectAsState
has some small delay to it before views are populated even if the underlying
Flow
is cached using
stateIn
? It's quite noticeable in the UI.
👀 1
d
Yes but it depends on what you mean. Are you collecting a
StateFlow
or some other
Flow
?
Is this delay significant or is it just a small "stutter" in the UI?
c
@Florian did you try a release build?
f
stateIn
makes it a StateFlow
@Colton Idle no I haven't yet
it's just a small stutter
c
I've noticed the same. But I always chalked it up to it being debug
d
stateIn
 makes it a StateFlow
Just making sure you aren't upcasting it to a
Flow
at any point and are calling the
collectAsState
function that takes no params.
The stutter shouldn't be there but 🤷🏼 , would need to see code at this point.
s
I had similar experience with paging extensions for collecting as State as well. i try to pass State directly.