Episode 2 — React Frontend Architecture NextJS / 2.13 — Global State Management

2.13.a — Context API: managing app-wide state

<< 2.13 Overview


Learning outcomes

  1. Create and consume context with createContext and useContext safely.
  2. Explain why context value identity triggers consumer updates.
  3. Choose Context for problems it actually solves—without replacing every prop.

Minimal example

import { createContext, useContext, useMemo, useState, type ReactNode } from "react";

type Theme = "light" | "dark";

type ThemeContextValue = {
  theme: Theme;
  setTheme: (t: Theme) => void;
};

const ThemeContext = createContext<ThemeContextValue | null>(null);

export function ThemeProvider({ children }: { children: ReactNode }) {
  const [theme, setTheme] = useState<Theme>("light");

  const value = useMemo(() => ({ theme, setTheme }), [theme]);

  return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>;
}

export function useTheme() {
  const ctx = useContext(ThemeContext);
  if (!ctx) throw new Error("useTheme must be used within ThemeProvider");
  return ctx;
}

Why useMemo on the value?

If you pass { theme, setTheme } inline each render, every consumer re-renders even when theme did not change, because the object identity changed.


What Context is not

  • Not a replacement for server cache (fetched entities, pagination)—use a data library.
  • Not a performance optimization by itself—it can increase render fan-out if misused.


Appendix — Scenario bank (basic → advanced)

Each card: symptom → cause → fix → interview phrase. Drill five cards daily and explain aloud without reading.

GS0-001 — Context API #1

  • Level: Beginner
  • Symptom: subtree re-renders 13% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-002 — Context API #2

  • Level: Beginner+
  • Symptom: subtree re-renders 26% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-003 — Context API #3

  • Level: Intermediate
  • Symptom: subtree re-renders 39% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-004 — Context API #4

  • Level: Intermediate+
  • Symptom: subtree re-renders 52% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-005 — Context API #5

  • Level: Advanced
  • Symptom: subtree re-renders 65% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-006 — Context API #6

  • Level: Advanced+
  • Symptom: subtree re-renders 78% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-007 — Context API #7

  • Level: Beginner
  • Symptom: subtree re-renders 91% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-008 — Context API #8

  • Level: Beginner+
  • Symptom: subtree re-renders 104% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-009 — Context API #9

  • Level: Intermediate
  • Symptom: subtree re-renders 117% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-010 — Context API #10

  • Level: Intermediate+
  • Symptom: subtree re-renders 130% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-011 — Context API #11

  • Level: Advanced
  • Symptom: subtree re-renders 143% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-012 — Context API #12

  • Level: Advanced+
  • Symptom: subtree re-renders 156% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-013 — Context API #13

  • Level: Beginner
  • Symptom: subtree re-renders 169% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-014 — Context API #14

  • Level: Beginner+
  • Symptom: subtree re-renders 182% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-015 — Context API #15

  • Level: Intermediate
  • Symptom: subtree re-renders 195% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-016 — Context API #16

  • Level: Intermediate+
  • Symptom: subtree re-renders 8% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-017 — Context API #17

  • Level: Advanced
  • Symptom: subtree re-renders 21% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-018 — Context API #18

  • Level: Advanced+
  • Symptom: subtree re-renders 34% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-019 — Context API #19

  • Level: Beginner
  • Symptom: subtree re-renders 47% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-020 — Context API #20

  • Level: Beginner+
  • Symptom: subtree re-renders 60% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-021 — Context API #21

  • Level: Intermediate
  • Symptom: subtree re-renders 73% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-022 — Context API #22

  • Level: Intermediate+
  • Symptom: subtree re-renders 86% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-023 — Context API #23

  • Level: Advanced
  • Symptom: subtree re-renders 99% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-024 — Context API #24

  • Level: Advanced+
  • Symptom: subtree re-renders 112% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-025 — Context API #25

  • Level: Beginner
  • Symptom: subtree re-renders 125% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-026 — Context API #26

  • Level: Beginner+
  • Symptom: subtree re-renders 138% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-027 — Context API #27

  • Level: Intermediate
  • Symptom: subtree re-renders 151% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-028 — Context API #28

  • Level: Intermediate+
  • Symptom: subtree re-renders 164% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-029 — Context API #29

  • Level: Advanced
  • Symptom: subtree re-renders 177% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-030 — Context API #30

  • Level: Advanced+
  • Symptom: subtree re-renders 190% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-031 — Context API #31

  • Level: Beginner
  • Symptom: subtree re-renders 3% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-032 — Context API #32

  • Level: Beginner+
  • Symptom: subtree re-renders 16% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-033 — Context API #33

  • Level: Intermediate
  • Symptom: subtree re-renders 29% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-034 — Context API #34

  • Level: Intermediate+
  • Symptom: subtree re-renders 42% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-035 — Context API #35

  • Level: Advanced
  • Symptom: subtree re-renders 55% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-036 — Context API #36

  • Level: Advanced+
  • Symptom: subtree re-renders 68% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-037 — Context API #37

  • Level: Beginner
  • Symptom: subtree re-renders 81% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-038 — Context API #38

  • Level: Beginner+
  • Symptom: subtree re-renders 94% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-039 — Context API #39

  • Level: Intermediate
  • Symptom: subtree re-renders 107% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-040 — Context API #40

  • Level: Intermediate+
  • Symptom: subtree re-renders 120% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-041 — Context API #41

  • Level: Advanced
  • Symptom: subtree re-renders 133% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-042 — Context API #42

  • Level: Advanced+
  • Symptom: subtree re-renders 146% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-043 — Context API #43

  • Level: Beginner
  • Symptom: subtree re-renders 159% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-044 — Context API #44

  • Level: Beginner+
  • Symptom: subtree re-renders 172% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-045 — Context API #45

  • Level: Intermediate
  • Symptom: subtree re-renders 185% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-046 — Context API #46

  • Level: Intermediate+
  • Symptom: subtree re-renders 198% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-047 — Context API #47

  • Level: Advanced
  • Symptom: subtree re-renders 11% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-048 — Context API #48

  • Level: Advanced+
  • Symptom: subtree re-renders 24% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-049 — Context API #49

  • Level: Beginner
  • Symptom: subtree re-renders 37% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-050 — Context API #50

  • Level: Beginner+
  • Symptom: subtree re-renders 50% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-051 — Context API #51

  • Level: Intermediate
  • Symptom: subtree re-renders 63% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-052 — Context API #52

  • Level: Intermediate+
  • Symptom: subtree re-renders 76% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-053 — Context API #53

  • Level: Advanced
  • Symptom: subtree re-renders 89% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-054 — Context API #54

  • Level: Advanced+
  • Symptom: subtree re-renders 102% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-055 — Context API #55

  • Level: Beginner
  • Symptom: subtree re-renders 115% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-056 — Context API #56

  • Level: Beginner+
  • Symptom: subtree re-renders 128% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-057 — Context API #57

  • Level: Intermediate
  • Symptom: subtree re-renders 141% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-058 — Context API #58

  • Level: Intermediate+
  • Symptom: subtree re-renders 154% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-059 — Context API #59

  • Level: Advanced
  • Symptom: subtree re-renders 167% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-060 — Context API #60

  • Level: Advanced+
  • Symptom: subtree re-renders 180% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-061 — Context API #61

  • Level: Beginner
  • Symptom: subtree re-renders 193% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-062 — Context API #62

  • Level: Beginner+
  • Symptom: subtree re-renders 6% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-063 — Context API #63

  • Level: Intermediate
  • Symptom: subtree re-renders 19% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-064 — Context API #64

  • Level: Intermediate+
  • Symptom: subtree re-renders 32% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-065 — Context API #65

  • Level: Advanced
  • Symptom: subtree re-renders 45% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-066 — Context API #66

  • Level: Advanced+
  • Symptom: subtree re-renders 58% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-067 — Context API #67

  • Level: Beginner
  • Symptom: subtree re-renders 71% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-068 — Context API #68

  • Level: Beginner+
  • Symptom: subtree re-renders 84% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-069 — Context API #69

  • Level: Intermediate
  • Symptom: subtree re-renders 97% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-070 — Context API #70

  • Level: Intermediate+
  • Symptom: subtree re-renders 110% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-071 — Context API #71

  • Level: Advanced
  • Symptom: subtree re-renders 123% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-072 — Context API #72

  • Level: Advanced+
  • Symptom: subtree re-renders 136% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-073 — Context API #73

  • Level: Beginner
  • Symptom: subtree re-renders 149% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-074 — Context API #74

  • Level: Beginner+
  • Symptom: subtree re-renders 162% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-075 — Context API #75

  • Level: Intermediate
  • Symptom: subtree re-renders 175% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-076 — Context API #76

  • Level: Intermediate+
  • Symptom: subtree re-renders 188% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-077 — Context API #77

  • Level: Advanced
  • Symptom: subtree re-renders 1% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-078 — Context API #78

  • Level: Advanced+
  • Symptom: subtree re-renders 14% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-079 — Context API #79

  • Level: Beginner
  • Symptom: subtree re-renders 27% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-080 — Context API #80

  • Level: Beginner+
  • Symptom: subtree re-renders 40% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-081 — Context API #81

  • Level: Intermediate
  • Symptom: subtree re-renders 53% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-082 — Context API #82

  • Level: Intermediate+
  • Symptom: subtree re-renders 66% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-083 — Context API #83

  • Level: Advanced
  • Symptom: subtree re-renders 79% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-084 — Context API #84

  • Level: Advanced+
  • Symptom: subtree re-renders 92% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-085 — Context API #85

  • Level: Beginner
  • Symptom: subtree re-renders 105% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-086 — Context API #86

  • Level: Beginner+
  • Symptom: subtree re-renders 118% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-087 — Context API #87

  • Level: Intermediate
  • Symptom: subtree re-renders 131% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-088 — Context API #88

  • Level: Intermediate+
  • Symptom: subtree re-renders 144% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-089 — Context API #89

  • Level: Advanced
  • Symptom: subtree re-renders 157% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-090 — Context API #90

  • Level: Advanced+
  • Symptom: subtree re-renders 170% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-091 — Context API #91

  • Level: Beginner
  • Symptom: subtree re-renders 183% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-092 — Context API #92

  • Level: Beginner+
  • Symptom: subtree re-renders 196% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-093 — Context API #93

  • Level: Intermediate
  • Symptom: subtree re-renders 9% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-094 — Context API #94

  • Level: Intermediate+
  • Symptom: subtree re-renders 22% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-095 — Context API #95

  • Level: Advanced
  • Symptom: subtree re-renders 35% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-096 — Context API #96

  • Level: Advanced+
  • Symptom: subtree re-renders 48% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-097 — Context API #97

  • Level: Beginner
  • Symptom: subtree re-renders 61% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-098 — Context API #98

  • Level: Beginner+
  • Symptom: subtree re-renders 74% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-099 — Context API #99

  • Level: Intermediate
  • Symptom: subtree re-renders 87% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-100 — Context API #100

  • Level: Intermediate+
  • Symptom: subtree re-renders 100% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-101 — Context API #101

  • Level: Advanced
  • Symptom: subtree re-renders 113% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-102 — Context API #102

  • Level: Advanced+
  • Symptom: subtree re-renders 126% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-103 — Context API #103

  • Level: Beginner
  • Symptom: subtree re-renders 139% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-104 — Context API #104

  • Level: Beginner+
  • Symptom: subtree re-renders 152% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-105 — Context API #105

  • Level: Intermediate
  • Symptom: subtree re-renders 165% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-106 — Context API #106

  • Level: Intermediate+
  • Symptom: subtree re-renders 178% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-107 — Context API #107

  • Level: Advanced
  • Symptom: subtree re-renders 191% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-108 — Context API #108

  • Level: Advanced+
  • Symptom: subtree re-renders 4% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-109 — Context API #109

  • Level: Beginner
  • Symptom: subtree re-renders 17% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-110 — Context API #110

  • Level: Beginner+
  • Symptom: subtree re-renders 30% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-111 — Context API #111

  • Level: Intermediate
  • Symptom: subtree re-renders 43% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-112 — Context API #112

  • Level: Intermediate+
  • Symptom: subtree re-renders 56% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-113 — Context API #113

  • Level: Advanced
  • Symptom: subtree re-renders 69% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-114 — Context API #114

  • Level: Advanced+
  • Symptom: subtree re-renders 82% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-115 — Context API #115

  • Level: Beginner
  • Symptom: subtree re-renders 95% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-116 — Context API #116

  • Level: Beginner+
  • Symptom: subtree re-renders 108% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-117 — Context API #117

  • Level: Intermediate
  • Symptom: subtree re-renders 121% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-118 — Context API #118

  • Level: Intermediate+
  • Symptom: subtree re-renders 134% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-119 — Context API #119

  • Level: Advanced
  • Symptom: subtree re-renders 147% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-120 — Context API #120

  • Level: Advanced+
  • Symptom: subtree re-renders 160% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-121 — Context API #121

  • Level: Beginner
  • Symptom: subtree re-renders 173% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-122 — Context API #122

  • Level: Beginner+
  • Symptom: subtree re-renders 186% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-123 — Context API #123

  • Level: Intermediate
  • Symptom: subtree re-renders 199% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-124 — Context API #124

  • Level: Intermediate+
  • Symptom: subtree re-renders 12% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-125 — Context API #125

  • Level: Advanced
  • Symptom: subtree re-renders 25% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-126 — Context API #126

  • Level: Advanced+
  • Symptom: subtree re-renders 38% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-127 — Context API #127

  • Level: Beginner
  • Symptom: subtree re-renders 51% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-128 — Context API #128

  • Level: Beginner+
  • Symptom: subtree re-renders 64% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-129 — Context API #129

  • Level: Intermediate
  • Symptom: subtree re-renders 77% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-130 — Context API #130

  • Level: Intermediate+
  • Symptom: subtree re-renders 90% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-131 — Context API #131

  • Level: Advanced
  • Symptom: subtree re-renders 103% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-132 — Context API #132

  • Level: Advanced+
  • Symptom: subtree re-renders 116% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-133 — Context API #133

  • Level: Beginner
  • Symptom: subtree re-renders 129% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-134 — Context API #134

  • Level: Beginner+
  • Symptom: subtree re-renders 142% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-135 — Context API #135

  • Level: Intermediate
  • Symptom: subtree re-renders 155% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-136 — Context API #136

  • Level: Intermediate+
  • Symptom: subtree re-renders 168% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-137 — Context API #137

  • Level: Advanced
  • Symptom: subtree re-renders 181% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-138 — Context API #138

  • Level: Advanced+
  • Symptom: subtree re-renders 194% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-139 — Context API #139

  • Level: Beginner
  • Symptom: subtree re-renders 7% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-140 — Context API #140

  • Level: Beginner+
  • Symptom: subtree re-renders 20% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-141 — Context API #141

  • Level: Intermediate
  • Symptom: subtree re-renders 33% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-142 — Context API #142

  • Level: Intermediate+
  • Symptom: subtree re-renders 46% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-143 — Context API #143

  • Level: Advanced
  • Symptom: subtree re-renders 59% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-144 — Context API #144

  • Level: Advanced+
  • Symptom: subtree re-renders 72% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-145 — Context API #145

  • Level: Beginner
  • Symptom: subtree re-renders 85% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-146 — Context API #146

  • Level: Beginner+
  • Symptom: subtree re-renders 98% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-147 — Context API #147

  • Level: Intermediate
  • Symptom: subtree re-renders 111% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-148 — Context API #148

  • Level: Intermediate+
  • Symptom: subtree re-renders 124% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-149 — Context API #149

  • Level: Advanced
  • Symptom: subtree re-renders 137% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-150 — Context API #150

  • Level: Advanced+
  • Symptom: subtree re-renders 150% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-151 — Context API #151

  • Level: Beginner
  • Symptom: subtree re-renders 163% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-152 — Context API #152

  • Level: Beginner+
  • Symptom: subtree re-renders 176% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-153 — Context API #153

  • Level: Intermediate
  • Symptom: subtree re-renders 189% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Mixing unrelated concerns in one context forces broad re-subscription.
  • Primary remediation: Create ThemeContext, UserSessionContext, etc., instead of AppContext god object.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-154 — Context API #154

  • Level: Intermediate+
  • Symptom: subtree re-renders 2% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Missing default for createContext leads to silent undefined bugs outside Provider.
  • Primary remediation: Throttle/debounce or move hot streams to refs + subscriptions outside React render.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-155 — Context API #155

  • Level: Advanced
  • Symptom: subtree re-renders 15% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Expensive computation inside Provider body runs on every parent render.
  • Primary remediation: Use smaller consumer subtrees or selector patterns (or migrate slice to Zustand).
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-156 — Context API #156

  • Level: Advanced+
  • Symptom: subtree re-renders 28% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Single context value is a fresh object every render, invalidating all consumers.
  • Primary remediation: Split context by concern and update frequency; memoize value objects with useMemo when stable.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

GS0-157 — Context API #157

  • Level: Beginner
  • Symptom: subtree re-renders 41% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Consumer components not memoized when selecting large derived subtrees.
  • Primary remediation: Move heavy work to lazy initialization, selectors, or dedicated modules below Provider.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Re-renders follow consumers; a changing context value updates every consumer.

GS0-158 — Context API #158

  • Level: Beginner+
  • Symptom: subtree re-renders 54% more than expected after a small unrelated UI change.
  • Architecture smell: unclear ownership of who may mutate shared state.
  • Root cause class: Using Context for high-frequency updates (mousemove) without throttling.
  • Primary remediation: Throw or assert when useContext runs without Provider in dev-only helpers.
  • Proof: React DevTools highlight updates; split providers and re-measure.
  • Interview one-liner: Context is a dependency-injection channel, not a free global variable—value identity matters.

<< 2.13 Overview