Compose
Composite Recipes
Recipes that include further recipes, often including the individual recipes below.
- Find Compose API design issues
- Find Compose
Modifierordering smells - Find Compose
Modifiersmells - Find Compose ViewModel wiring issues
- Find Compose effect handler issues
- Find Compose effect-handler misuse
- Find Compose layout hierarchy smells
- Find Compose navigation / coroutine misuse
- Find Compose recomposition smells
- Find Compose stability and recomposition issues
- Find Compose stability issues
- Find Compose state + remember misuse
- Find Compose state read/write issues
- Find
Modifier.padding(...)shorthand opportunities - Find lifecycle-naive flow / LiveData collection in Composables
- Find
remember \{ mutableStateOf(emptyList/Map()) \}candidates for snapshot-aware containers - Find single-child wrapper composables (Material 3)
- Replace deprecated Jetpack Compose methods
Recipes
- Apply Compose autofix rewrites
- Find
@Composablecalls inside non-@Composablelambda parameters - Find
@Composable fun … (): Xfunctions returning a non-Unitvalue - Find
@Composablefunctions whose name starts with a lowercase letter - Find
@Composablefunctions withList/Map/Setparameters - Find
@Composablefunctions withMutableList/MutableMap/MutableSetparameters - Find
@Composablefunctions with a content lambda parameter not defaulted to\{\} - Find
@Composablefunctions without aModifierparameter - Find
@Immutableon classes withvarproperties - Find
@Stableclasses holding mutable-collection properties - Find
@Stableon classes withvarproperties - Find
Array<T>parameters on@Composablefunctions - Find
Box \{ … \}with a single child - Find
Canvas \{ … \}blocks inside a@Composable - Find
Card \{ OneChild() \}patterns - Find
Color(0xFF…)/Color.Xliterals inside@Composable - Find
Column \{ … \}with a single child - Find Compose function-naming conventions
- Find Compose
rememberkey issues - Find
DisposableEffect \{ … \}blocks missing anonDispose \{ \} - Find
Flow.collectAsState()calls — prefercollectAsStateWithLifecycle() - Find
Flow<T>/StateFlow<T>parameters on@Composablefunctions - Find
LaunchedEffectbodies with several distinct suspend calls - Find
LaunchedEffect \{ … \}calls with no key argument - Find
LaunchedEffect(Unit) \{ … \}blocks - Find
LaunchedEffect(true) \{ … \}blocks - Find
LazyColumn \{ … \}calls — verify items use stable keys - Find
LazyColumn/LazyRowitems(...)calls missing akey = \{ … \}argument - Find
LazyRow \{ … \}calls — verify items use stable keys - Find
LazyVerticalGrid \{ … \}calls — verify items use stable keys - Find
LiveData.observe(...)calls inside@Composable - Find
LiveData.observeAsState()calls — prefercollectAsStateWithLifecycle() - Find
Modifier.clickable \{ \}.background(...)chains - Find
Modifier.fillMaxSize().fillMaxWidth()chains - Find
Modifier.fillMaxWidth().padding(...)chains - Find
Modifier.fillMaxXxx().padding(...)chains - Find
Modifier.weight(...)calls outside aRow/Columnscope - Find
Modifier.xxx()allocations inside a@Composablebody - Find
Modifier.xxx().yyy()...chains longer than five operations - Find
NavController.navigate(...)calls in a@Composablebody - Find
Row \{ … \}with a single child - Find
SideEffect(key) \{ … \}calls - Find
Surface \{ OneChild() \}patterns - Find
android.content.Contextparameters on@Composablefunctions - Find bare
mutableStateOf(...)inside@Composablewithoutremember \{ \} - Find
by remember \{ … \}delegations whose body isn't amutableStateOf - Find
data classdeclarations withList<T>properties - Find
for (...) \{ LaunchedEffect(...) \{ … \} \}patterns - Find hardcoded color literals inside
@Composable - Find
hiltViewModel<X>()calls inside@Composable - Find
if (x) Modifier.foo() else Modifierpatterns - Find
java.io.File(...)allocations inside a@Composablebody - Find lambda parameters on
@Composablefunctions - Find lazy-list
items(...) \{ … \}content lambdas that read aMutableStatefrom the enclosing scope - Find
listOf(...)/mapOf(...)/setOf(...)calls inside a@Composable - Find logging calls in
@Composablebodies - Find
mutableStateOf(...)stored in a class field - Find
n.dpallocations inside a@Composablebody - Find non-
@Composablefunctions calling@Composable-only APIs - Find non-
privateMutableStateFlowproperties - Find
padding(start = x, end = x, top = x, bottom = x)shorthand opportunities - Find
padding(start = x, end = x, top = y, bottom = y)shorthand opportunities - Find
remember \{ mutableListOf<T>() \}patterns - Find
remember \{ mutableStateOf(emptyList<T>()) \}candidates formutableStateListOf - Find
remember \{ mutableStateOf(emptyMap<K, V>()) \}candidates formutableStateMapOf - Find
remember \{ mutableStateOf(expensiveCall()) \}patterns - Find
remember \{ … \}calls with no keys - Find
remember(mutableListOf(...), …)and similar unstable-key calls - Find
rememberCoroutineScope()calls inside a lambda - Find
scope.launch \{ … \}calls inside a@Composablebody - Find
state.valuereads inside a@Composable - Find
viewModel.uiState.collectAsState()calls — confirm lifecycle-aware collection - Find
viewModel<X>()calls inside@Composable - Find zero-valued
Modifier.padding(...)calls