Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Provides patterns for Compose Multiplatform and Jetpack Compose: state management, navigation, theming, performance, and platform UI.
Use this skill ↓91% 91%0 ptsof test cases passed
Passed 20 of 22 test cases with the skill, and 20 of 22 without it.
3 of 3 safety checks passed
3 agent runs
Patterns for building shared UI across Android, iOS, Desktop, and Web using Compose Multiplatform and Jetpack Compose. Covers state management, navigation, theming, and performance.
Use a single data class for screen state. Expose it as StateFlow and collect in Compose:
data class ItemListState(
val items: List<Item> = emptyList(),
val isLoading: Boolean = false,
val error: String? = null,
val searchQuery: String = ""
)
class ItemListViewModel(
private val getItems: GetItemsUseCase
) : ViewModel() {
private val _state = MutableStateFlow(ItemListState())
val state: StateFlow<ItemListState> = _state.asStateFlow()
fun onSearch(query: String) {
_state.update { it.copy(searchQuery = query) }
loadItems(query)
}
private fun loadItems(query: String) {
viewModelScope.launch {
_state.update { it.copy(isLoading = true) }
Published skills whose descriptions closely match this one, with their benchmark result.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.