Concepts for Reduxs
Redux concepts explain how the library keeps state predictable: a single store holds the state, actions describe what happened, and reducers return the next state from the previous one. Redux Toolkit wraps this with configureStore and createSlice, so you write less code and mutate-looking updates are safely handled by Immer.
Stage: Core Ideas · Part of the Redux roadmap · Last reviewed 19 November 2026
What to learn in Concepts
- Describe the unidirectional data flow of store, action and reducer
- Create a store with configureStore from Redux Toolkit
- Write a slice with createSlice and export its actions
- Explain why reducers must be pure and how Immer allows draft mutation
- Read and update state in React with useSelector and useDispatch
Concepts interview questions
Why must reducers be pure functions?
Redux relies on a reducer returning the same output for the same state and action, with no side effects. That keeps state changes predictable, lets DevTools replay actions, and allows cheap reference checks to detect changes. API calls and random values belong outside reducers.
How can createSlice appear to mutate state?
Inside createSlice reducers, Redux Toolkit uses Immer. You write code like state.value += 1 against a draft, and Immer tracks the changes and produces a new immutable state. Outside Immer-wrapped reducers you must still copy objects manually.
Where Concepts fits in the Redux roadmap
Concepts belongs to the Core Ideas stage (beginner level). How Redux works.
Back to the full Redux roadmap