state-colocation

Installation
SKILL.md

State Colocation

Phase 1 — Diagnose the Colocation Problem

Three distinct problems, three different fixes. Misidentifying them causes the wrong refactor.

Symptom Problem Fix
Parent holds state, only one child reads/sets it Over-lifted state Push down
Two siblings need the same value State too low Lift up to nearest common ancestor
Prop passes through 2+ components that don't use it Drill or wrong level Push down OR context — see §2.3
Context/store slice used by exactly one component Over-globalized Push down to local state
Re-renders cascade to unrelated subtrees on every state change State too high Push down or split context

Phase 2 — Non-Obvious Rules

2.1 "Nearest Common Ancestor" Is Not Always the Right Target for Lifting

Installs
1
GitHub Stars
2
First Seen
Apr 22, 2026
state-colocation — blunotech-dev/agents