You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Greetings @raamcosta , I have the following issue that I need assistance of.. So, I have a top level navigation where currently I am solving in the following way:
@composable
private fun ExecuteNavigation(
navController: NavHostController,
direction: Direction,
addToBackstack: Boolean?,
previousDestination: Direction?
) {
val destinationsNavigator = navController.rememberDestinationsNavigator()
First issue that I meet is that if I pull navController.rememberDestinationsNavigator() outside the composable that I am calling the navigation from, the next screen that I land at keeps on recomposing infinitely. Basically, the only workaround that I found is to call the rememberDestinationsNavigator() locally.. I would have gone for navController.toDestinationsNavigator(), since I do not really need executeNavigation() to be a composable function, but the outcome is the same..
I would rather sort this one out first, after which I guess I would reach to my second question. Any assistance on that matter? What would cause this infinite next screen recomposition? I basically want to call the DestinationsNavigator at a top level.
The text was updated successfully, but these errors were encountered:
Made some progress but not sure that this has to be the following way. I moved the destinationsNavigator to a top level and I did fix the recomposition the following way:
I still think that this is incorrect and infinite recomposition after screen navigation should not happen.
This brings me to my second question now, when i navigate back to Screen 1 , after initial navigation , components on the screen react to clicks, however only screen recomposition happens.
Greetings @raamcosta , I have the following issue that I need assistance of.. So, I have a top level navigation where currently I am solving in the following way:
@composable
private fun ExecuteNavigation(
navController: NavHostController,
direction: Direction,
addToBackstack: Boolean?,
previousDestination: Direction?
) {
val destinationsNavigator = navController.rememberDestinationsNavigator()
}
First issue that I meet is that if I pull navController.rememberDestinationsNavigator() outside the composable that I am calling the navigation from, the next screen that I land at keeps on recomposing infinitely. Basically, the only workaround that I found is to call the rememberDestinationsNavigator() locally.. I would have gone for navController.toDestinationsNavigator(), since I do not really need executeNavigation() to be a composable function, but the outcome is the same..
I would rather sort this one out first, after which I guess I would reach to my second question. Any assistance on that matter? What would cause this infinite next screen recomposition? I basically want to call the DestinationsNavigator at a top level.
The text was updated successfully, but these errors were encountered: