LogoClawIndex
CasesSkillsAbout
LogoClawIndex

ClawIndex

OpenClaw Skills & Use Case Index

ClawIndex is an ecosystem-driven index of OpenClaw skills and real-world use cases.

Index

Skills·
Cases

Meta

About·
Disclaimer·
Email·
GitHub
© 2026 ClawIndex All Rights Reserved.

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-28

Capabilities

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

Source

  • Spec: SKILL.md
Android
Jetpack Compose
ViewModel
StateFlow
Kotlin Coroutines
configuration changes
Expose ViewModel StateFlow
Collect flows with lifecycle
Retain flows across configuration changes
Implement accumulated pagination state
ViewModel StateFlow
Compose UI lifecycle
Repository data flows
Compose UI state
Retained shared flows
Pagination state updates