Why I NEVER Use Redux in 2025

Why I NEVER Use Redux in 2025

26/03/2025Saul Vo


Redux has long been a staple in the React ecosystem, but in 2025, I never use it. While it remains a valuable skill for job applications, for personal and most professional projects, it's overkill. Let me take you through a simple comparison between Redux and the Context API to illustrate why.

The Overhead of Redux

I built a simple Next.js app that implements both Redux and Context API to achieve the same result. At first glance, they might seem similar, as both require wrapping the app in a provider:

  • Redux: Requires a single Provider for the entire app.
  • Context API: Requires multiple providers if using different contexts (e.g., AuthContext, UserContext). This might lead to provider nesting, but it's manageable.

The Complexity of Redux Setup

The Redux setup requires a significant amount of boilerplate code:

  1. Creating the Store: The Redux store must be configured and wrapped in a provider, ensuring it runs on the client side.
  2. Creating Slices: Each state slice requires its own separate file with createSlice, defining reducers, initialState, and actions.
  3. Using Redux in Components:
    • Use useSelector to access state.
    • Use useDispatch to modify state.
    • Import multiple utilities for even basic interactions.

This is a lot of unnecessary complexity just to manage state.

The Simplicity of Context API

On the other hand, Context API keeps things minimal and straightforward:

  1. State Management: Uses built-in React useState, making it easy to understand and modify.
  2. Single File Management: A context provider can be written in one file, making organization much simpler.
  3. Custom Hook for Ease:
    • A custom hook like useGlobalState makes accessing and modifying state intuitive.
    • No need to import multiple utilities—just call useGlobalState and access your data directly.

Real-World Example: A Shopping Cart

I use Context API in production applications, such as a shopping cart provider. This provider manages:

  • Cart state
  • Add to cart / remove from cart functions
  • Local storage synchronization
  • Custom hook for easy access (useCart)

This setup is concise, maintainable, and relies solely on core React features—no extra libraries required.

Why I Stopped Using Redux

  1. Too much boilerplate: Setting up Redux requires multiple files and abstract concepts that increase complexity unnecessarily.
  2. Slower development: Importing multiple utilities (useSelector, useDispatch, action creators, reducers) slows down coding and debugging.
  3. Unnecessary abstraction: Redux introduces additional layers that often aren't needed for most applications.
  4. Context API is enough: For 99% of use cases, Context API, combined with useState or useReducer, provides everything you need with minimal setup.

Conclusion

If you're applying for jobs, knowing Redux is beneficial. However, for personal and production projects, I never use Redux. Context API, with custom hooks, provides a much simpler, maintainable, and efficient way to manage state. Redux had its time, but in 2025, it's largely unnecessary.