What problem does it solve?
Long prop chains across component trees cause fragile code and make maintenance painful. This skill promotes using composition and clear boundaries to keep changes localized, preventing unrelated parts from breaking when you modify a feature.
Core Features & Use Cases
- Composition over drilling: replace deep prop chains with composition (children) to pass content and behavior.
- Single-responsibility interfaces: encourage small, focused hooks and components to limit ripple effects.
- Guided application: apply the pattern when props traverse three or more levels or a hook returns five or more values, so changes stay isolated.
- Real-world example: refactor a modal workflow to pass content via children instead of threading props through multiple layers.
Quick Start
Refactor components to minimize prop drilling by adopting the composition pattern (children) and isolating responsibilities.