React's Context API & useReducer — Advanced State ManagementEntry 7 of 7
Summary
| Concept | React | Angular |
|---|---|---|
| Avoid prop drilling | Context | Injectable service |
| Create shared state | createContext() | @Injectable() |
| Provide it | <Ctx value={...}> (React 19) / <Ctx.Provider> | providedIn: 'root' or component providers |
| Consume it | useContext() / use() / custom hook | inject() |
| Local reactive state | useState | signal() |
| Complex transitions | useReducer + actions | Service methods + update() |
| Derived values | Compute in render / useMemo | computed() |
| Re-render scope | Every consumer of the context | Only bindings reading the changed signal |
React separates the two jobs of shared state: Context distributes the data, and useReducer organizes how it changes. Angular's dependency injection plus signals handle both in a single service.