0xf1f1
02/06/2024, 8:45 PMjefbit
02/06/2024, 8:48 PMAbdullah
02/08/2024, 2:18 PM*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