compose-state-deferred-reads

Defer Jetpack Compose state reads into layout and draw phases.

1|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/leogallego/ansible-jane --skill compose-state-deferred-reads-leogallego
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compose-state-deferred-reads
Source: https://github.com/leogallego/ansible-jane/tree/main/skills/compose-state-deferred-reads
Command: npx skills add https://github.com/leogallego/ansible-jane --skill compose-state-deferred-reads-leogallego

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Jetpack Compose apps can suffer unnecessary recompositions when frame-rate state (like scroll offsets, animations, and gesture positions) is read inside a composable body. Deferred reads and provider-based state help keep recomposition costs down by moving reads to layout or draw phases.

Core Features & Use Cases

  • Avoids back-writing of state across phases by encouraging provider-based reads and layout/draw-scoped access.
  • Supports common scenarios: scroll position, animation progress, drag offsets read across composable boundaries.
  • Improves UI stability and performance in scrollable lists, complex layouts, and animated components.

Quick Start

Describe how to implement deferred reading of State in a Jetpack Compose UI to reduce recompositions.

Frequently Asked Questions about compose-state-deferred-reads

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce unnecessary recompositions in Jetpack Compose?

Reduce unnecessary recompositions in Jetpack Compose by deferring state reads of frame-rate values like scroll offsets and animations, moving them out of the composable body and into layout or draw phases.

What are deferred state reads in Jetpack Compose?

Deferred state reads in Jetpack Compose are a performance technique that moves reading frame-rate state, such as animation progress or gesture positions, into layout or draw callbacks instead of the composition phase.

How do I move state reads to layout or draw phases in Compose?

Move state reads to layout or draw phases in Compose by using provider-based reads and layout or draw-scoped access, passing state down to avoid back-writing across composable boundaries.

When should I defer state reads in Jetpack Compose?

Defer state reads in Jetpack Compose when UI reads frame-rate values such as scroll offsets, animations, or gesture states across composable boundaries, which is common in scrollable lists and complex animated components.

Does deferring state reads maintain layout stability in Compose?

Deferring state reads maintains layout stability in Compose by decorating measure constraints and using provider-based reads, ensuring that frame-rate state changes do not trigger full recompositions or shift layout phases.