what is the best practise with view model initialisation in nested screens ? they are not created by the main activity and thus do not have access to the model data
*val* sharedVModel:*MainViewModel = viewModel<MainViewModel>(*LocalContext*.current as ComponentActivity)*
in here I am giving context as ComponentActivity so your viewmodel will be live until you destroyed the activity. you can access data in viewmodel from any composeview