DEVPREP CODEX · #22
Redux Interview Questions
60 curated questions graded from Foundations (Easy) to Practical Patterns (Medium) and Internals & Architecture (Hard).
TOTAL QUESTIONS
60
THEORY QUESTIONS
60
IMPLEMENTATION FOLIOS
0
FREE QUESTIONS
5 / Level
Easy Level·20 Questions Total
Foundations & Core Concepts
Q1What is Redux and what problem does it solve?
- Definition: A predictable state container for JavaScript apps. State lives in one store; the only way to change it is dispatching actions into pure reducers.
- Problems solved:
- Prop drilling — any component can subscribe to exactly the slices it needs.
- Unpredictable mutations — immutability makes every change traceable.
- Scattered state logic — transitions are centralized and testable.
- Best suited to complex, shared client state; overkill for purely local UI state.
Q2Explain the three core principles of Redux.
- Single source of truth — the entire app state is one object tree stored in one store.
- State is read-only — components never mutate; they dispatch plain action objects describing what happened.
- Changes via pure functions — reducers take
(previousState, action)and return the next state, with no side effects. These three rules give you time-travel debugging, deterministic tests and trivial undo/redo foundations.
Q3What are the core building blocks of Redux?
- Store — holds state, exposes
getState(),dispatch(),subscribe(). - Action — a plain object
{ type, payload? }describing an event. - Action creator — a function returning an action (keeps dispatch sites clean and typed).
- Reducer — pure function producing next state per action.
- Dispatch — the only mutation entry point.
- Selector — function reading derived data from state (
state => state.cart.items).
Q4What is the difference between an action and an action creator?
- An action is the payload object itself:
{ type: 'cart/add', payload: { id } }. - An action creator is the function that builds it:
const addToCart = id => ({ type: 'cart/add', payload: { id } }). - Why bother with creators: centralizes action shapes, gives TypeScript a single typed factory, keeps components free of string literals, and (with thunks/sagas) becomes the place where async logic starts.
- With Redux Toolkit you rarely hand-write them —
createSlicegenerates creators automatically from reducer names.
Q5What does a reducer look like and what rules must it follow?
function cartReducer(state = initialState, action) {
switch (action.type) {
case 'cart/add':
return { ...state, items: [...state.items, action.payload] };
default:
return state;
}
}
Rules:
- Pure — same inputs ⇒ same output; no API calls, no Date.now/Math.random.
- No mutation — spread/copy every touched level.
- Default case returns state unchanged (enables cheap bailouts).
- Never return undefined — React state reads will explode.
15 More Easy Questions Locked
Unlock the complete Redux Easy question bank
Get instant access to all 20 questions, in-depth model answers, code sandboxes, and all 27+ technologies for a single one-time payment.
Unlock All — One-time payment · Lifetime access
Browse All Redux Questions by Difficulty
Easy20 Questions
Core concepts, definitions, basic syntax, and first principles expected in round 1 screening.
VIEW FULL LIST
Medium20 Questions
Real-world mechanisms, state management, edge cases, performance trade-offs, and practical coding.
VIEW FULL LIST
Hard20 Questions
Deep runtime internals, memory models, distributed design, concurrency failure modes, and architectural decisions.
VIEW FULL LIST
INTERNAL LINKING & DEPENDENCIES