Can anyone please tell me how to share a ViewModel in compose inside navigation? I am getting two instances of the ViewModel from two different compose functions, whereas I need to share just one instance of it. Please answer this question in StackOverflow if you can, which no one was able to answer so far. Thanks!
https://stackoverflow.com/questions/68548488/sharing-viewmodel-within-jetpack-compose-navigation