Find @Composable functions with MutableList/MutableMap/MutableSet parameters

Proprietary

Compose's stability inferrer treats MutableList/MutableMap/MutableSet parameters as unstable — every recomposition compares by identity and re-invokes the composable even if no element changed. Use kotlinx.collections.immutable.ImmutableList (or wrap in a @Stable class) so equality checks short-circuit and recomposition is skipped.

org.openrewrite.kotlin.compose.FindMutableCollectionAsComposableParam$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.compose.FindMutableCollectionAsComposableParam$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.