Find remember { mutableStateOf(emptyMap<K, V>()) } candidates for mutableStateMapOf
Proprietaryremember { mutableStateOf(emptyMap()) } boxes the map in a MutableState, so writes require state.value = state.value + … (or a clone). mutableStateMapOf<K, V>() is a snapshot-aware map: direct put/remove calls register as snapshot writes and trigger recomposition for readers.
org. openrewrite. kotlin. compose. UseMutableStateMapOf$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. compose. UseMutableStateMapOf$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.