Redux Actions vs Reducers vs Slices: The Modern Mental Model
Actions, reducers, and slices are the building blocks of Redux. Here is how they relate in the modern RTK mental model.
Redux Actions vs Reducers vs Slices: The Modern Mental Model
Actions, reducers, and slices are the building blocks of Redux. Understanding how they relate is the key to the modern RTK mental model.
Actions
An action is a plain object describing what happened, with a type and an optional payload. In classic Redux you wrote action types and creators by hand; in RTK, createSlice generates them.
Reducers
A reducer is a function that takes the current state and an action and returns the new state. Reducers must be pure: no side effects, no mutation of the argument. In RTK, you write reducers inside createSlice.
Slices
A slice is a collection of state and reducers for one feature, bundled together. A cart slice holds cart state and the reducers that update it. Slices are the RTK way to organize Redux.
How They Relate
A slice contains the state and the reducers. The reducers respond to actions. createSlice auto-generates action creators from your reducers, so you do not hand-write actions.
The One-Way Flow
An action is dispatched, the store runs the relevant reducer, the reducer returns new state, and the new state flows to components via useSelector. This one-way flow is the core of Redux.
Why Slices Replaced the Old Structure
Classic Redux split actions, types, and reducers across many files, which was verbose and hard to follow. Slices bundle them per feature, which is far cleaner and easier to maintain.
The Takeaway
Actions describe what happened, reducers return new state, and slices bundle state and reducers per feature. createSlice auto-generates actions from reducers, replacing the old split structure with a cleaner, feature-based model.
Actions are objects describing what happened. Reducers are functions that take state and an action and return new state. Slices bundle state and reducers for one feature together. In RTK, createSlice auto-generates actions from your reducers.
A collection of state and reducers for one feature, bundled together. A cart slice holds cart state and the reducers that update it. Slices are the RTK way to organize Redux by feature instead of by file type.
Yes. createSlice auto-generates action creators from your reducers, so you do not hand-write action types and creators as in classic Redux. You define the reducer, and RTK creates the action creator with the same name.
A function that takes the current state and an action and returns the new state. Reducers must be pure, with no side effects and no mutation of the argument. In RTK, you write reducers inside createSlice.
An action is dispatched, the store runs the relevant reducer, the reducer returns new state, and the new state flows to components via useSelector. This one-way flow is the core of Redux.
Ready to master React completely?
Want to upskill yourself, crack your next interview, and get your dream job? Join our comprehensive course to dive deeper with high-quality video tutorials, solve interview questions, and a premium community.
Master React
Want to upskill yourself, crack your next interview, and get your dream job? Join our comprehensive course.

