Find remember { mutableStateOf(emptyList<T>()) } candidates for mutableStateListOf

Proprietary

remember { mutableStateOf(emptyList()) } boxes the list in a MutableState, so writes require state.value = state.value + item. mutableStateListOf<T>() is a snapshot-aware list: add/remove register as snapshot writes and trigger recomposition for readers.

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