Find scope.launch { … } calls inside a @Composable body
Proprietaryscope.launch { … } in a @Composable body starts a new coroutine on every recomposition — none of them get cancelled until the scope dies. Use LaunchedEffect(key) { … }, which is automatically cancelled and restarted by the composition's lifecycle.
org. openrewrite. kotlin. compose. FindCoroutineLaunchInComposableBody$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. compose. FindCoroutineLaunchInComposableBody$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.