PreCompose
PreCompose copied to clipboard
Scenes freezing when quickly switching routes with transitions
The issue of scenes freezing when quickly switching routes still persists in version 1.6.0-beta02, possibly due to animation-related issues.
Example:
LaunchedEffect(Unit){
coroutineScope.launch {
for (i in 0 until 10){
println(i)
navigator.navigate("/edit")
delay(200)
navigator.navigate("/home")
delay(200)
}
}
}
When using with the default animation, after 1 to 3 transitions, it will stop navigating and remain frozen indefinitely, while all interactions except routing work normally, and any route changes will not affect the actual content.
After modifying the transitions:
navTransition = NavTransition(
createTransition = EnterTransition.None,
destroyTransition = ExitTransition.None,
pauseTransition = ExitTransition.None,
resumeTransition = EnterTransition.None,
)
Then it works great.