compose-state-deferred-reads

Community

Stop scroll and animation stutter from bad state reads

Authorsoygabimoreno
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill prevents Compose performance issues caused by reading fast-changing frame-rate state (like scroll offsets or animation values) in the composition phase, which triggers excessive recomposition and cascaded invalidations.

Core Features & Use Cases

  • Defer state reads to layout/draw: Keep animated/scroll/gesture values as State and read .value inside value-form modifier blocks such as Modifier.offset { ... } or inside draw blocks like drawBehind.
  • Avoid back-writing across phases: Stop observable state from being written in layout/draw and then read in composition (or written in composition and read earlier in the same pass), which can create extra invalidation cycles.
  • Use provider lambdas across composable boundaries: Pass () -> T providers instead of snapshot values when values change every frame and are consumed by modifiers deep in the UI tree.
  • Handle measurement dependencies correctly: When one row’s measured size affects another row, apply the measured constraint during measure/layout rather than reading the measurement state in composition.

Quick Start

Use the compose-state-deferred-reads Skill when you notice recomposition counters climb during scrolling or animation even when your underlying data is stable.

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: compose-state-deferred-reads
Download link: https://github.com/soygabimoreno/Los-ANDROIDES/archive/main.zip#compose-state-deferred-reads

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