Anyone has any clue how to retain a shared view model object across different composables? I'm using hilt and injecting viewmodel instance using hilt in composable. Basically there are 3 screens which share same data and changes I want to share it and I'm thinking of sharing this data through a shared view model.
myViewModel: MyViewModel = hiltViewModel()
So how can i use this MyViewModel as shared view model?