compose-multiplatform-patterns
KMPプロジェクト向けのCompose MultiplatformおよびJetpack Composeパターン — 状態管理、ナビゲーション、テーマ設定、パフォーマンス、プラットフォーム固有のUI。
Original · translation did not pass checksTarget: 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 Japanese text
Topics in the source
- Compose Multiplatformパターン
- 起動条件
- 状態管理
- ViewModel + 単一状態オブジェクト
- Composeでの状態収集
- イベントシンクパターン
- ナビゲーション
- 型安全なナビゲーション(Compose Navigation 2.8+)
Compose MultiplatformとJetpack Composeを使用して、Android、iOS、デスクトップ、Web間で共有UIを構築するためのパターン。状態管理、ナビゲーション、テーマ設定、パフォーマンスをカバーします。 Compose UIの構築(Jetpack ComposeまたはCompose Multiplatform) ViewModelとCompose状態によるUI状態の管理 KMPまたはAndroidプロジェクトでのナビゲーション実装 再利用可能なコンポーザブルとデザインシステムの設計 リコンポジションとレンダリングパフォーマンスの最適化 画面状態には単一のデータクラスを使用します。StateFlowとして公開し、Composeで収集します: 複雑な画面では、複数のコールバックラムダの代わりにイベント用のシールドインターフェースを使用します: ルートを@Serializableオブジェクトとして定義します: 命令型のshow/hideの代わりにdialog()とオーバーレイパターンを使用します: 柔軟性のためにスロットパラメータを持つコンポーザブルを設計します: Modifierの順序は重要です — 以下の順序で適用します: すべてのプロパティが安定している場合、クラスを@Stableまたは@Immutableでマークします: ライフサイクルに対してより安全なcollectAsStateWithLifecycleを使用したMutableStateFlowがある場合にViewModelでmutableStateOfを使用すること コンポーザブルの深い階層にNavControllerを渡すこと — 代わりにラムダコールバックを渡す @Composable関数内の重い計算 — ViewModelかremember {}に移動する 一部の設定では設定変更のたびに再実行されるため、ViewModel initの代替としてLaunchedEffect(Unit)を使用すること コンポーザブルのパラメータに新しいオブジェクトインスタンスを作成すること — 不必要なリコンポジションを引き起こす スキル: モジュール構造とレイヤーについてはandroid-clean-architectureを参照。 スキル: コルーチンとFlowパターンについてはkotlin-coroutines-flowsを参照。
- Source repository
- affaan-m/ECC
- Source file
- docs/ja-JP/skills/compose-multiplatform-patterns/SKILL.md
- Fixed revision
- d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
Requirements
- Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.
A small first task
先阅读原作者说明,再决定是否在自己的 AI 工具中使用。
Instructions for your AI tool
- Claude Desktop: resource-specific guide not available yet
- Claude Code: resource-specific guide not available yet
- Cursor: resource-specific guide not available yet
- Codex: resource-specific guide not available yet
Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.
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-09T14:01:49.032Z.
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.