for composable? For example here listed example when viewModel value assigning as default parameter in composable function by
viewModel()
call. If i understand correct this factory creates (or returns) view model from activity or fragment scope.
But what if i develop single activity app with huge number of features on billions screens? Should i use activity view model scope or i must include fragments to my code or there is better way to handle memory in compose?
iamthevoid
07/05/2021, 12:30 PM
i want any composable-related scope that will be destroyed after view goes out from stack
d
Daniel
07/05/2021, 12:40 PM
You can scope viewmodels to navigation destinations which are composables instead of fragments
i
iamthevoid
07/05/2021, 12:50 PM
Checked that.
onCleared
calls when composable goes out from screen, it is perfect!