Redux in React
Redux is a predictable state container: one store, reducers are pure (state, action) => newState, you dispatch actions. UI subscribes. It’s Flux-shaped. You do not need Redux for a counter. You consider it when many distant screens share complex state (cart + checkout + admin) and you want time-travel/debug tools.
Modern Redux: Redux Toolkit (configureStore, createSlice). Don’t teach 2016 switch-statement boilerplate as ‘how we write Redux now’. Context+useReducer can cover smaller apps.
Redux in React — output — 1. dispatch({type:'inc'}) → reducer → new state → UI. Never mutate the old state.
view click
│ dispatch
▼
reducer
│ new state
▼
store → UIWhen Redux vs useState/Context. Mention RTK.