Find Compose recomposition smells

Proprietary

Recomposition-related patterns whose default behavior surprises authors: LazyColumn/LazyRow/LazyVerticalGrid whose inner items(...) calls have no key (composition state churns on reorder), and lazy-list content lambdas that read snapshot state from the enclosing scope (every state change invalidates the entire list).

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

Recipe list

It runs these recipes, in this order.

  1. Find LazyColumn { … } calls — verify items use stable keys
  2. Find LazyRow { … } calls — verify items use stable keys
  3. Find LazyVerticalGrid { … } calls — verify items use stable keys
  4. Find lazy-list items(...) { … } content lambdas that read a MutableState from the enclosing scope