shared-viewmodels

Community

Unified multi-platform ViewModels for Android&iOS

AuthordimitriRemoiville
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Centralizes cross-platform UI state management by providing a canonical pattern for shared ViewModels in KMM projects, reducing boilerplate and divergence between Android and iOS implementations.

Core Features & Use Cases

  • Shared three-part contract: state: StateFlow, events: Flow via a Channel, and onAction(action) as the single entry point.
  • Canonical shape and example: A ViewModel exposes a public state, a channel-based events stream, and a single entry function, and is consumed from Jetpack Compose on Android and SwiftUI on iOS.
  • Non-null initial state, error handling with domain types, and testability guidance for ViewModels.

Quick Start

Install and adopt the shared-viewmodels pattern in your KMM project to coordinate UI state and actions across Android and iOS.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: shared-viewmodels
Download link: https://github.com/dimitriRemoiville/cc-mobile/archive/main.zip#shared-viewmodels

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.