How do I scope object to a Composable (something l...
# compose
k
How do I scope object to a Composable (something like what navigation viewmodel does)?
i
use remember or CompositionLocal
k
I believe navigation viewmodel that we currently have on Android is actually using DI to keep the state persistent, and it uses navigation to determine if recreation of an object is required.
a
Remember seems enough. Or do you mean scope it to the backstackentry like the Viewmodel?
k
@allan.conda Like on a ViewModel.