What problem does it solve?
This Skill helps you handle side effects in Jetpack Compose effectively, avoiding common pitfalls such as stale captures, redundant restarts, and lifecycle mismanagement.
Core Features & Use Cases
- Effective Side Effects: Provides guidelines on choosing the right effect (LaunchedEffect, DisposableEffect, SideEffect) and effect keys to ensure code clarity and performance.
- Preventing Stale Captures: Offers solutions to manage effect keys and remember updated states to avoid common pitfalls in managing UI side effects.
- Flow Collection and User Events: Details best practices for using flows in
LaunchedEffect and handling user events efficiently.
- Registration and Cleanup: Explains how to properly set up and clean up lifecycle observers and disposables for a clean, bug-free experience.
Quick Start
Utilize this skill to analyze the use of effects in your Jetpack Compose project, focusing on ensuring the appropriate usage of side effects, proper handling of keys, and preventing common errors related to side effect lifecycles.