Paul Stern
09/16/2024, 3:38 PMLaunchedEffect(key1 = viewModel.tokenManager.state.value.isTokenAvailable) {
if (!viewModel.tokenManager.state.value.isTokenAvailable) {
navigator.popBackStack()
navigator.navigate(AppNavigation.Splash.route)
}
}
(https://github.com/razaghimahdi/Shopping-By-KMP/blob/master/shared/src/commonMain/kotlin/presentation/App.kt)
My questions are:
1. What are 'navigators'? Can you please try explaining it maybe even in a general way? Well, I can guess, that navigators are something that helps moving to and from different screens, but maybe I'm missing something vital.
2. How are they related to 'Splashes'? And what are those 'splashes"? Having got started with Kotlin really little time ago, I haven't seen this word before. I mean I could have seen it, but it seems vague to me. Is it something about screens? Or maybe some peaces of user interface shown at a taken point of time?
3. How do they do together with 'Routes"? So, I can guess, these are related to navigation too, and may be they 'show the way' or, namely, 'route', to a specific place of an app. But I guess I need a somewhat better understanding of it.
I would be really grateful for any answers and feedback. Looking forward to get a message,
regards,
Paul S.Kirill Grouchnikov
09/17/2024, 3:25 AMKirill Grouchnikov
09/17/2024, 3:25 AMPaul Stern
09/18/2024, 9:34 AM