How do I scope object to a Composable (something like what navigation viewmodel does)?
i
ildar.i [Android]
03/05/2022, 1:26 PM
use remember or CompositionLocal
k
K Merle
03/05/2022, 1:36 PM
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
allan.conda
03/06/2022, 4:34 AM
Remember seems enough. Or do you mean scope it to the backstackentry like the Viewmodel?