What problem does it solve?
This Skill provides best practices and guidance for building efficient, maintainable, and visually consistent user interfaces with Jetpack Compose, addressing common challenges in state management, performance, and theming.
Core Features & Use Cases
- State Hoisting: Learn to implement unidirectional data flow for stateless Composables.
- Modifier Best Practices: Understand how to correctly use and order modifiers for layout and interaction.
- Performance Optimization: Discover techniques like
remember and derivedStateOf to prevent unnecessary recompositions.
- Theming & Resources: Guidance on using MaterialTheme for consistent styling.
- Previews: Tips for creating effective preview functions for UI components.
- Use Case: Refactor an existing Composable function to follow state hoisting principles, making it more testable and reusable.
Quick Start
Apply state hoisting to the provided Composable function by moving its state to the caller and accepting a callback for state changes.