I don't have code now, I am a refactoring my norma...
# compose
k
I don't have code now, I am a refactoring my normal compose code to navigation compose. I have UiState something like Loading, Error, fetching etc in viewmodel and business logic is handled there. I am writing code as an example in here
Copy code
val uistate = loading, error, fetching
Some conditions in the viewmodel to emit the state
Copy code
fun sendLoadingState{
   If ()
      Uistate = Loading
   else()
}
In compose function I am calling
sendLoadingState
In Launcheffect.
Copy code
When(viewmodel.uistate){
  Loading -> LoadingScreen()
  .. // more code in here
}
I see in the documentation of navigation to use
navigateUp.