Find NavController.navigate(...) calls in a @Composable body

Proprietary

navController.navigate(...) called directly in the body fires on every recomposition, leading to navigation loops or back-stack corruption. Wrap in a LaunchedEffect(key) { … } keyed by the condition that should trigger the navigation, or move the call into an event handler (onClick = { … }).

org.openrewrite.kotlin.compose.FindNavigateInComposableBody$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.compose.FindNavigateInComposableBody$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.