Hi all!
I've got a question about Navigation with Compose. I have a Drawer composable that is my main navigation component of the app. I'm using Koin to inject the viewModels. Whenever I select a drawer item the app navigates to my composable and the viewmodel is created, I can navigate forward to another screen within the feature and the viewmodel is retained as expected. However if I go to another drawer item and return to the previous screen the viewModel is not recreated leaving me with previous data on screen.
Is there a way that I can reset composable and viewmodel whenever a Drawer menu item is clicked?
This is how I navigate and my NavHost is pretty simple too.