Justin Yue
09/10/2021, 5:03 PMlaunchedEffect
of my main screen, but the app then momentarily shows the main screen before navigating to the auth screen if no user is logged in. I would like to remove the delay in navigating to the auth screen. I'm not entirely sure if using launchedEffect
in this case is best practice too.Justin Yue
09/10/2021, 5:05 PM@Composable
fun HomeScreen() {
LaunchedEffect(isLoggedIn) {
if (!isLoggedIn) {
navigateToAuthScreen()
}
}
}
Waqas Tahir
09/10/2021, 5:05 PMJustin Yue
09/10/2021, 5:39 PM