
UsamaI Was Writing 4 Redux Functions for Everything… Until Redux Toolkit Changed It When I first started...
I Was Writing 4 Redux Functions for Everything… Until Redux Toolkit Changed It
When I first started learning Redux, I thought this was just how things worked.
If I needed to manage a simple feature, I had to write:
At first, it felt “professional”.
But after a few days, it started to feel… repetitive.
And honestly, a bit exhausting.
Let me be real.
Redux is powerful. No doubt.
But as a beginner, I kept asking myself:
Why do I need so much code just to update a simple state?
For one feature, I was jumping between multiple files:
actions.jsreducers.jsstore.jsAnd inside those files:
It felt like I was doing the same thing again and again.
Today, I finally spent time understanding Redux Toolkit.
And this is where everything started to change.
Redux Toolkit is basically the modern way of writing Redux.
It removes the unnecessary complexity and keeps the power.
There were two functions that completely changed my understanding:
configureStore
Before:
I had to manually use:
createStorecombineReducersapplyMiddlewareNow:
Just one function:
const store = configureStore({
reducer: rootReducer,
});
That’s it.
Everything is handled internally.
No extra setup.
createSlice
This one honestly surprised me.
Before, I had to write:
Separately.
Now:
const counterSlice = createSlice({
name: "counter",
initialState: { value: 0 },
reducers: {
increment(state) {
state.value++;
},
},
});
And just like that:
One function replaces 3–4 things.
What I really liked is how clean everything feels now.
Everything lives in one place.
And for the first time, Redux felt… simple.
Another thing I learned today:
You don’t have to switch everything at once.
You can use:
in the same project
And both connect to React in the same way.
That means you can migrate step by step.
No pressure.
Today wasn’t about building something big.
It was about understanding:
How to write better Redux code.
How to reduce unnecessary complexity.
How to focus more on logic instead of boilerplate.
Before today, Redux felt like a lot of work.
After understanding Redux Toolkit, it finally started to feel practical.
If you’re learning Redux right now, my honest advice:
Don’t just learn classic Redux.
Learn Redux Toolkit early.
It will save you time, energy, and a lot of confusion.