Why not produce State from the Jetpack Compose, instead of Flow or StateFlow? #59
-
Hi! Why build a P.S. Thanks to everyone who works on this library! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
We don't really use Compose UI yet, so Supporting |
Beta Was this translation helpful? Give feedback.
We don't really use Compose UI yet, so
State
is a somewhat useless type to us. Our returnedStateFlow
is collected by our presenter-render integration layer which passes the models to the renderer which are almost entirely views. Additionally,StateFlow
is a type which represents both a synchronously-available value as well as a mechanism by which you can subscribe to updates. WithState
you only get the former and have to usesnapshotFlow
for the latter. Except because of Google's failure to ship Compose in a true multiplatform context we cannot pass aroundState
to multiplatform code whereasStateFlow
is fully multiplatform.Supporting
State
is as trivial as ourStateFlow
support which …