react-usecontext

Installation
SKILL.md

React useContext

Overview

Context provides "global" data to a component tree without prop drilling. The key insight: context is overused the same way Redux once was — consider simpler alternatives first.

When to Use Context

  • Truly global, stable data — auth/user, theme, i18n, permissions
  • Deep prop drilling (3+ levels) — props passing through components that don't use them
  • Compound components — local, isolated context for tightly coupled UI (best use case)

When NOT to Use

Scenario Use instead
1-2 levels of props Normal props — it's not "drilling"
Frequently changing state Zustand / Jotai
Server data (fetch, cache) React Query / TanStack Query
Related skills

More from b4r7x/agent-skills

Installs
16
First Seen
Mar 11, 2026