compose-viewmodel-bridge - Connect ViewModel StateFlow to Compose UI
Guides lifecycle-aware StateFlow collection in Compose and retained sharing across configuration changes.
Tags
Updated: 2026-09-28Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Expose ViewModel StateFlow
- Collect flows with lifecycle
- Retain flows across configuration changes
- Implement accumulated pagination state
- Handle snackbar error state
- Debug state collection issues
Inputs
- ViewModel StateFlow
- Compose UI lifecycle
- Repository data flows
- Navigation arguments
- Pagination events
Outputs
- Compose UI state
- Retained shared flows
- Pagination state updates
- Snackbar error messages
- ViewModel source changes
Requirements
- Android framework
- Kotlin Coroutines Flow
- Jetpack Compose
- Lifecycle-aware Compose collection
- ViewModel scope
