preserving-state-across-reloads

Preserve Jetpack Compose UI state during hot reloads using HotSwan recomposition scopes.

8|Updated May 18, 2025
One-click install
npx skills add https://github.com/decoutkhanqindev/DexReader --skill preserving-state-across-reloads-decoutkhanqindev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: preserving-state-across-reloads
Source: https://github.com/decoutkhanqindev/DexReader/tree/main/.claude/skills/preserving-state-across-reloads
Command: npx skills add https://github.com/decoutkhanqindev/DexReader --skill preserving-state-across-reloads-decoutkhanqindev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents UI state loss and re-escalation in Jetpack Compose during hot reloads, improving development workflow efficiency.

Core Features & Use Cases

  • State Preservation: Safely retains scroll position, navigation state, and rememberable values across reloads.
  • Hot Reload Management: Identifies when a reload has escalated beyond tier 1, helping to prevent and manage such escalations.
  • State Holder Guidance: Details which state holders can be safely used during different tiers of hot reload.

Quick Start

Analyze a HotSwan tool window reload status and ensure your edits remain within tier 1 to prevent UI state loss during hot reloads.

Frequently Asked Questions about preserving-state-across-reloads

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

FAQPage Schema
How do I preserve Jetpack Compose UI state during hot reloads?

Preserving Jetpack Compose UI state during hot reloads requires utilizing Compose HotSwan's recomposition scopes and specific state holder configurations to safely retain scroll position and rememberable values across reloads.

Why does my Jetpack Compose state reset when using hot reload?

Your Jetpack Compose state resets because the hot reload escalated beyond tier 1. Identifying when a reload escalates helps prevent UI state loss and maintain development workflow efficiency.

How do I keep Jetpack Compose hot reload edits within tier 1?

To keep Jetpack Compose hot reload edits within tier 1, analyze the HotSwan tool window reload status and ensure your code edits remain within tier 1 boundaries to prevent UI state loss.

Which state holders are safe to use during Compose HotSwan hot reloads?

Safe state holders during Compose HotSwan hot reloads depend on the reload tier. Follow state holder best practices and check guidance to determine which holders can be safely used during different tiers of hot reload.

Do I need to understand recomposition to preserve state in Jetpack Compose hot reloads?

Yes, preserving state during Jetpack Compose hot reloads requires awareness of Compose recomposition scopes and state holder best practices to effectively manage and optimize state without losing UI data.

What is the best way to manage navigation state loss during Jetpack Compose hot reload?

The best way to manage navigation state loss during Jetpack Compose hot reload is to utilize Compose HotSwan's recomposition scopes and state holder configurations to safely retain navigation state across reloads.