compose-state-holder-ui-split

安装量: 534
排名: #9287

安装

npx skills add https://github.com/chrisbanes/skills --skill compose-state-holder-ui-split

Compose: state holder/UI split Core principle Separate state-holder wiring from UI rendering. The state-holder composable talks to ViewModels, components, flows, navigation, and side effects. The UI composable takes plain immutable UI state plus callbacks and describes layout. This keeps screens previewable, testable, and easier to reuse across Android, Desktop, TV, and KMP/CMP targets. When to use this skill Use this when a Compose screen: Takes a ViewModel, component, controller, navigator, repository, or service directly. Collects app/business state or side effects in the same function that lays out most UI. Passes a whole state holder into child composables instead of explicit state and callbacks. Is hard to preview because it needs dependency injection, navigation, lifecycle, or fake services. Has UI tests that must construct a full app stack to verify a simple layout branch. The pattern Show more Installs 473 Repository chrisbanes/skills GitHub Stars 743 First Seen May 12, 2026 Security Audits Gen Agent Trust Hub Pass Socket Pass Snyk Pass

返回排行榜