SKILL

compose-multiplatform-patterns

Compose Multiplatform and Jetpack Compose patterns for KMP projects — state management, navigation, theming, performance, and platform-specific UI. Use when building Compose or Jetpack Compose UI, state, navigation, or theming in a KMP project.

Target: Target not categorized. Automatically collected · unverified.

Excerpt from the author’s documentation

Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.

Read the original English text

Topics in the source

  • Compose Multiplatform Patterns
  • When to Activate
  • State Management
  • ViewModel + Single State Object
  • Collecting State in Compose
  • Event Sink Pattern
  • Navigation
  • Type-Safe Navigation (Compose Navigation 2.8+)

Patterns for building shared UI across Android, iOS, Desktop, and Web using Compose Multiplatform and Jetpack Compose. Covers state management, navigation, theming, and performance. Building Compose UI (Jetpack Compose or Compose Multiplatform) Managing UI state with ViewModels and Compose state Implementing navigation in KMP or Android projects Designing reusable composables and design systems Optimizing recomposition and rendering performance Use a single data class for screen state. Expose it as StateFlow and collect in Compose: For complex screens, use a sealed interface for events instead of multiple callback lambdas: Define routes as @Serializable objects: Use dialog() and overlay patterns instead of imperative show/hide: Design composables with slot parameters for flexibility: Modifier order matters — apply in this sequence: Mark classes as @Stable or @Immutable when all properties are stable: Using mutableStateOf in ViewModels when MutableStateFlow with collectAsStateWithLifecycle is safer for lifecycle Passing NavController deep into composables — pass lambda callbacks instead Heavy computation inside @Composable functions — move to ViewModel or remember {} Using LaunchedE

This is an excerpt. Refer to the complete source and its current requirements.

Source repository
affaan-m/ECC
Source file
pi/core/skills/compose-multiplatform-patterns/SKILL.md
Fixed revision
d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
Read the complete original documentation ↗

Sources and evidence

This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.

Author: affaan-m/ECC · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T15:01:42.895Z.

Categories are inferred from names, descriptions and paths. They do not establish compatibility.

License and attribution

MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.

Original license ↗

Synchronization, copying and user-reported success do not mark a resource as runtime-tested.

Limitations and notes

  • Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.