ReReact · Lesson 6 of 8
Context & State Management
Context lets you share data across a component tree without passing props through every level. It's great for global state like the current user, theme, or locale — but it's not a replacement for a proper state manager in complex apps.
◆ Note
Context re-renders all consumers when the value changes. For frequently-changing data (like a real-time counter), context can cause performance issues. Use Zustand, Jotai, or Redux Toolkit for complex global state. Context is best for infrequently-changing global config.
Context re-renders all consumers when the value changes. For frequently-changing data (like a real-time counter), context can cause performance issues. Use Zustand, Jotai, or Redux Toolkit for complex global state. Context is best for infrequently-changing global config.