Hi… With ComposeState, do we still need LiveData f...
# compose
e
Hi… With ComposeState, do we still need LiveData for Jetpack Compose? The ComposeState (e.g. with
rememberSaveable
) seems to cover Both onConfiguration and State Restoration.
c
The only thing you really need with compose is snapshot state (i.e. mutableStateOf and mutableStateListOf, etc) No need for livedata, or flow or anything (unless something from upstream gives you some observable) then you will just consume it via the
asState
extension functions.
a
When we do reactive programming we removed all
livedata
for
Lifecycle.repeatOnLifecycle
This helped us ... https://medium.com/androiddevelopers/a-safer-way-to-collect-flows-from-android-uis-23080b1f8bda