Should You Learn Redux?
Tags: redux, react, javascript, webdev
Published: 2019-11-07 23:25:38

---
title: Should You Learn Redux?
published: true
description: Is learning Redux worth it?
tags: redux, react, javascript, webdev
cover_image: https://res.cloudinary.com/dovoq8jou/image/upload/v1573166591/articles/redux-should-you-learn-redux.png
canonical_url: https://stevenmercatante.com/should-you-learn-redux
---

___

*This post was originally published at [stevemerc.com](https://stevenmercatante.com/should-you-learn-redux)*
___

{% twitter 1191487232038883332 %}

(_In case you're unaware, Dan co-created Redux._)

Ever since React's context API became stable, and especially after the release of hooks, a boatload of posts told us that Redux was on its deathbed. Who needs Redux when we've got the context API? Who wants to write all that boilerplate code? It's way too verbose when all I want to do is push an item to an array!

I don't necessarily disagree with those sentiments. Redux _can_ be a pain to use, but sometimes it's the right choice for a project.

_I want to pause here and say that I'm really grateful for Redux. Its creators and maintainers have spent a ton of time and energy in making a powerful tool. I've made good money working on projects that use it. And it's probably single handedly responsible for teaching more people how `reduce` works than anything else._

## So, Should You Learn Redux?

When a post asks if you should learn something, the answer is usually "it depends." But not this post. **Yes, you should learn Redux.**

Regardless of the flak it gets, it's still the most popular state management library for React apps. It's battle tested, has [incredible tooling](https://github.com/reduxjs/redux-devtools), and there's a large community around it. If you've got a question, someone's already answered it.

This means that you're likely going to encounter and work on a project that uses it. And no matter how much you protest that there's a better option (maybe there is, maybe there isn't), you're gonna have to use it. So, rather than fight it, embrace it.

The [official docs](https://redux.js.org/) are great. Spend some time with them. Redux isn't the easiest library to grok, which is why knowing how it works is useful before you find yourself neck deep working in a project that uses it.

I'd also recommend learning how [Reselect](https://github.com/reduxjs/reselect) and [Immer](https://immerjs.github.io/immer/docs/introduction) work. They're not necessary to use Redux, but they can improve performance and readability, and it's not uncommon to see them used alongside Redux.

_[Edit: also check out [Redux Starter Kit](https://redux-starter-kit.js.org/), mentioned by [Mark Erikson](https://dev.to/markerikson) in the comments below.]_ 

## Should You _Use_ Redux?

This is where I respond with "it depends". Personally, I've stopped using Redux for new projects. Local state and the context API can get you very far. And when I need something more powerful, I use [MobX](https://mobx.js.org/README.html). The balance it strikes between Redux and not-Redux is great. But, as a consultant, I often find myself working on projects that use Redux, and knowing how it works is essential.

In the end, the choice to learn Redux and the choice to use it are two different things. I think it's at least worth learning.

👋 **Enjoyed this post?**

Join my [newsletter](https://stevemerc.com/newsletter/?r=dev) and follow me on Twitter [@mercatante](https://twitter.com/mercatante) for more content like this.