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
Stateis a somewhat useless type to us. Our returnedStateFlowis collected by our presenter-render integration layer which passes the models to the renderer which are almost entirely views. Additionally,StateFlowis a type which represents both a synchronously-available value as well as a mechanism by which you can subscribe to updates. WithStateyou only get the former and have to usesnapshotFlowfor the latter. Except because of Google's failure to ship Compose in a true multiplatform context we cannot pass aroundStateto multiplatform code whereasStateFlowis fully multiplatform.Supporting
Stateis as trivial as ourStateFlowsupport which …