Anyone experienced issue with `previousBackStackEn...
# coroutines
k
Anyone experienced issue with
previousBackStackEntry
? It's always null in case:
Copy code
val navController: NavHostController = rememberNavController()
val previousBackStackEntry = navController.previousBackStackEntry
and works correctly when has these 2 extra lines:
Copy code
val navController: NavHostController = rememberNavController()
val currentState by navController.currentBackStackEntryAsState()
val currentRoute: String? = currentState?.destination?.route
val hasPreviousBackStackEntry = navController.previousBackStackEntry
Found it. @Composable that contains this logic does not recompose itself.
c
this belongs in #compose not #coroutines 🙂
😇 1
k
Mb 🙂
😄 1