Find @Composable functions with List/Map/Set parameters

Proprietary

kotlin.collections.List (and friends) are read-only views, not immutable types — a List<T> can be a MutableList<T> upcast, so Compose's stability inferrer marks the parameter unstable and re-invokes the composable on every parent recomposition. Use ImmutableList<T> from kotlinx.collections.immutable or wrap in a @Immutable data holder.

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