Episode 2 — React Frontend Architecture NextJS / 2.13 — Global State Management
2.13.b — Context providers & consumers: deep trees
Learning outcomes
- Compose multiple providers without a pyramid of unreadable JSX.
- Share state through deep trees without prop drilling—while keeping boundaries explicit.
- Export custom hooks (
useAuth) instead of raw context everywhere.
Provider composition pattern
export function AppProviders({ children }: { children: React.ReactNode }) {
return (
<QueryClientProvider client={queryClient}>
<ThemeProvider>
<AuthProvider>{children}</AuthProvider>
</ThemeProvider>
</QueryClientProvider>
);
}
Order matters when inner providers depend on outer ones (e.g., auth client needing theme for branded errors—rare but real).
Deep trees: mental model
Consumers anywhere below a provider can read context. That is powerful and dangerous: implicit coupling replaces explicit props.
Mitigation: narrow context types, document allowed mutations, code-review provider changes.
Testing
Provide a renderWithProviders(ui, { authUser: ... }) helper so tests do not copy 40 lines of wrapping.
Appendix — Scenario bank (basic → advanced)
Each card: symptom → cause → fix → interview phrase. Drill five cards daily and explain aloud without reading.
GS1-001 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-002 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-003 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-004 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-005 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-006 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-007 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-008 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-009 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-010 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-011 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-012 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-013 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-014 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-015 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-016 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-017 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-018 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-019 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-020 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-021 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-022 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-023 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-024 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-025 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-026 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-027 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-028 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-029 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-030 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-031 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-032 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-033 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-034 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-035 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-036 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-037 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-038 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-039 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-040 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-041 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-042 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-043 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-044 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-045 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-046 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-047 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-048 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-049 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-050 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-051 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-052 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-053 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-054 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-055 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-056 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-057 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-058 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-059 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-060 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-061 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-062 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-063 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-064 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-065 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-066 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-067 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-068 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-069 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-070 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-071 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-072 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-073 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-074 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-075 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-076 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-077 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-078 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-079 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-080 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-081 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-082 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-083 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-084 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-085 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-086 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-087 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-088 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-089 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-090 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-091 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-092 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-093 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-094 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-095 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-096 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-097 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-098 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-099 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-100 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-101 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-102 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-103 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-104 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-105 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-106 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-107 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-108 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-109 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-110 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-111 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-112 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-113 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-114 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-115 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-116 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-117 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-118 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-119 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-120 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-121 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-122 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-123 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-124 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-125 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-126 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-127 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-128 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-129 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-130 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-131 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-132 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-133 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-134 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-135 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-136 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-137 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-138 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-139 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-140 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-141 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-142 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-143 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-144 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-145 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-146 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-147 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-148 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-149 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-150 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-151 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-152 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-153 — Providers & consumers #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: Consumer hooks scattered without naming convention (
useX). - Primary remediation: Export
useTheme,useAuthhooks wrapping useContext for ergonomics + errors. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-154 — Providers & consumers #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: Rendering Provider inside a route that unmounts resets unrelated state unexpectedly.
- Primary remediation: Build a
renderWithProviderstest utility with sensible defaults. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-155 — Providers & consumers #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: Passing unstable callbacks through createContext default instead of Provider value.
- Primary remediation: Introduce facades or domain modules so consumers depend on narrow APIs.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-156 — Providers & consumers #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: Provider nested 14 levels deep with duplicated boundaries confusing ownership.
- Primary remediation: Compose providers with a single
AppProvidersmodule; document order dependencies. - Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-157 — Providers & consumers #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: Prop drilling replaced by context drilling without reducing coupling.
- Primary remediation: Always supply value via Provider; keep defaults for tests only.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.
GS1-158 — Providers & consumers #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: Testing becomes painful because every test must wrap the entire provider tree.
- Primary remediation: Lift persistent providers to layout shell that does not unmount on navigation.
- Proof: React DevTools highlight updates; split providers and re-measure.
- Interview one-liner: Providers are boundaries—decide what crosses them as carefully as public APIs.