Is there any "official" connection between Datastore and compose?
c
Casey Brooks
07/29/2021, 3:58 PM
DataStore returns
Flow
, which can be collected in Compose with
collectAsState
. Iām not sure how much more integrated it even could get
ā 2
a
alorma
07/29/2021, 4:33 PM
Oh well, something like
rememberDataStorePreference<>()
š 1
z
Zun
07/29/2021, 5:42 PM
Surely not difficult to make that, but you got to ask yourself if you want your views to be responsible for storing data. What about testing and reusing that preference?