D
DevPrepSystematic Prep
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

Open Full Easy List
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 — createSlice generates 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:

  1. Pure — same inputs ⇒ same output; no API calls, no Date.now/Math.random.
  2. No mutation — spread/copy every touched level.
  3. Default case returns state unchanged (enables cheap bailouts).
  4. 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
DEDICATED LEVEL PAGES

Browse All Redux Questions by Difficulty

INTERNAL LINKING & DEPENDENCIES

Related Technologies to Redux

CAREER PATHWAYS

Redux is a key requirement for these engineering roles:

Redux Interview Questions — Easy, Medium & Hard | DevPrep | DevPrep