choosing-derivedstateof

Community

Choose when derivedStateOf helps or hurts.

Authorskydoves
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill helps developers decide whether to use Jetpack Compose's derivedStateOf to filter high-frequency inputs into a stable derived output, preventing unnecessary recompositions.

Core Features & Use Cases

  • Identify when derivedStateOf adds value by filtering input/output frequency.
  • Enforce remember { derivedStateOf { … } } and use remember keys for captured non-state values.
  • Prefer snapshotFlow for one-shot side effects on derived values and avoid triggering recompositions directly.
  • Real-world scenarios include scroll-driven booleans (e.g., show FAB on scroll), threshold checks, and recomposition-tracking diagnostics.

Quick Start

Identify a high-frequency input driving a low-frequency output and wrap the derived computation in remember { derivedStateOf { … } } with non-state captures as remember keys.

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: choosing-derivedstateof
Download link: https://github.com/skydoves/compose-performance-skills/archive/main.zip#choosing-derivedstateof

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 510,000+ vetted skills library on demand.