react-context-patterns
Installation
SKILL.md
React Context Patterns
Master react context patterns for building high-performance, scalable React applications with industry best practices.
Understanding Prop Drilling vs Context
Prop drilling occurs when you pass props through multiple layers of components that don't need them, just to reach a deeply nested component.
// Prop Drilling (AVOID)
function App() {
const [user, setUser] = useState<User | null>(null);
return <Layout user={user} setUser={setUser} />;
}