redux vs mobx vs vuex vs easy-peasy vs redux-toolkit
Choosing a state model while identifying the actual Redux package
reduxmobxvuexeasy-peasyredux-toolkitSimilar Packages:

Choosing a state model while identifying the actual Redux package

Compare application architectures and legacy helpers without confusing the unscoped redux-toolkit name with official Redux Toolkit.

Npm Package Weekly Downloads Trend

3 Years

Github Stars Ranking

Stat Detail

Package
Downloads
Stars
Size
Issues
Publish
License
redux69,486,94461,435290 kB173 years agoMIT
mobx4,577,44128,2154.9 MB166 days agoMIT
vuex2,261,59128,282271 kB144-MIT
easy-peasy66,8855,040422 kB277 months agoMIT
redux-toolkit2,2632-0--

First identify the application and the exact package

A React application choosing model-driven state, observable state or explicit reducers is making an architectural decision. A Vue application has a different binding ecosystem. This comparison includes those routes and one historical Redux helper package; it is not a list of five interchangeable store imports.

Easy Peasy 6.1.1 builds on Redux 5 and provides model/action/computed/thunk conventions with React hooks/provider integration. MobX 7.1.6 tracks observable state and derived reactions, with framework binding separate from the core. Redux 5.0.1 provides the core store/action/reducer model; official modern Redux authoring uses @reduxjs/toolkit 2.14.0 on top of that core.

Do not install the wrong Toolkit

The exact name redux-toolkit 1.1.2 points to an independent package from yeatszhang. Its actual exports are createAction, createReducer and debugMiddleware. It does not provide the official Toolkit's store/slice/Immer/RTK Query contract. Shared function names also have different signatures and semantics.

The inspected function-valued createAction payload branch uses the function as a computed property key rather than the standard payload field. Its outer function invokes the action constructor twice. The debugging middleware also calls next without returning its result. These are concrete limitations for callbacks and dispatch-result expectations; do not copy the README's helper examples as proof of an official compatible API. Existing users should review the exact helper paths used before migration.

Keep framework and update models visible

Vuex 4.1.0 declares Vue ^3.2 and uses state/getters/mutations/actions/modules. Its official guidance retains maintenance but recommends Pinia for new projects. That is not a deprecation marker, and a historical statement about Pinia supporting Vue 2 must not be applied to an unverified current Pinia version.

Reducer-style state, observable updates and model-based actions require different migration work in selectors, derived values, asynchronous effects and subscriptions. Easy Peasy's current React peers are 18/19; do not assume core-library compatibility automatically validates every optional UI integration.

Choose according to the app's framework and state ownership. For official Redux tutorials, use the scoped official package; for an existing unscoped helper dependency, treat it as legacy utilities with its own observed behavior. Do not choose an application state architecture by download counts or a familiar-looking package name.

How to Choose: redux vs mobx vs vuex vs easy-peasy vs redux-toolkit

  • redux:

    Evaluate 5.0.1 as the core action/reducer/store model. The official recommended authoring layer is @reduxjs/toolkit; it builds on Redux rather than being an unrelated competing store.

  • mobx:

    Evaluate 7.1.6 for observable state, actions and derived reactions. Framework bindings are separate from core, and moving from reducer-driven state changes the programming model.

  • vuex:

    Understand 4.1.0 for an existing Vue 3 application. Official guidance recommends Pinia for new Vue projects while continuing Vuex maintenance; it is not a direct React-store replacement.

  • easy-peasy:

    Evaluate 6.1.1 for a React model/action/computed/thunk abstraction built on Redux 5. It declares React/React DOM 18/19 peers; app bindings and optional integrations need their own setup.

  • redux-toolkit:

    Understand 1.1.2 only as the independent yeatszhang helper package. It exports createAction/createReducer/debugMiddleware, not official configureStore/createSlice/RTK Query, and has concrete helper limitations.

README for redux

Redux Logo

Redux is a predictable state container for JavaScript apps.

It helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. On top of that, it provides a great developer experience, such as live code editing combined with a time traveling debugger.

You can use Redux together with React, or with any other view library. The Redux core is tiny (2kB, including dependencies), and has a rich ecosystem of addons.

Redux Toolkit is our official recommended approach for writing Redux logic. It wraps around the Redux core, and contains packages and functions that we think are essential for building a Redux app. Redux Toolkit builds in our suggested best practices, simplifies most Redux tasks, prevents common mistakes, and makes it easier to write Redux applications.

GitHub Workflow Status npm version npm downloads redux channel on discord

Installation

Create a React Redux App

The recommended way to start new apps with React and Redux Toolkit is by using our official Redux Toolkit + TS template for Vite, or by creating a new Next.js project using Next's with-redux template.

Both of these already have Redux Toolkit and React-Redux configured appropriately for that build tool, and come with a small example app that demonstrates how to use several of Redux Toolkit's features.

# Vite with our Redux+TS template
# (using the `degit` tool to clone and extract the template)
npx degit reduxjs/redux-templates/packages/vite-template-redux my-app

# Next.js using the `with-redux` template
npx create-next-app --example with-redux my-app

We do not currently have official React Native templates, but recommend these templates for standard React Native and for Expo:

npm install @reduxjs/toolkit react-redux

For the Redux core library by itself:

npm install redux

For more details, see the Installation docs page.

Documentation

The Redux core docs are located at https://redux.js.org, and include the full Redux tutorials, as well usage guides on general Redux patterns:

The Redux Toolkit docs are available at https://redux-toolkit.js.org, including API references and usage guides for all of the APIs included in Redux Toolkit.

Learn Redux

Redux Essentials Tutorial

The Redux Essentials tutorial is a "top-down" tutorial that teaches "how to use Redux the right way", using our latest recommended APIs and best practices. We recommend starting there.

Redux Fundamentals Tutorial

The Redux Fundamentals tutorial is a "bottom-up" tutorial that teaches "how Redux works" from first principles and without any abstractions, and why standard Redux usage patterns exist.

Help and Discussion

The #redux channel of the Reactiflux Discord community is our official resource for all questions related to learning and using Redux. Reactiflux is a great place to hang out, ask questions, and learn - please come and join us there!

Before Proceeding Further

Redux is a valuable tool for organizing your state, but you should also consider whether it's appropriate for your situation. Please don't use Redux just because someone said you should - instead, please take some time to understand the potential benefits and tradeoffs of using it.

Here are some suggestions on when it makes sense to use Redux:

  • You have reasonable amounts of data changing over time
  • You need a single source of truth for your state
  • You find that keeping all your state in a top-level component is no longer sufficient

Yes, these guidelines are subjective and vague, but this is for a good reason. The point at which you should integrate Redux into your application is different for every user and different for every application.

For more thoughts on how Redux is meant to be used, please see:

Basic Example

The whole global state of your app is stored in an object tree inside a single store. The only way to change the state tree is to create an action, an object describing what happened, and dispatch it to the store. To specify how state gets updated in response to an action, you write pure reducer functions that calculate a new state based on the old state and the action.

Redux Toolkit simplifies the process of writing Redux logic and setting up the store. With Redux Toolkit, the basic app logic looks like:

import { createSlice, configureStore } from '@reduxjs/toolkit'

const counterSlice = createSlice({
  name: 'counter',
  initialState: {
    value: 0
  },
  reducers: {
    incremented: state => {
      // Redux Toolkit allows us to write "mutating" logic in reducers. It
      // doesn't actually mutate the state because it uses the Immer library,
      // which detects changes to a "draft state" and produces a brand new
      // immutable state based off those changes
      state.value += 1
    },
    decremented: state => {
      state.value -= 1
    }
  }
})

export const { incremented, decremented } = counterSlice.actions

const store = configureStore({
  reducer: counterSlice.reducer
})

// Can still subscribe to the store
store.subscribe(() => console.log(store.getState()))

// Still pass action objects to `dispatch`, but they're created for us
store.dispatch(incremented())
// {value: 1}
store.dispatch(incremented())
// {value: 2}
store.dispatch(decremented())
// {value: 1}

Redux Toolkit allows us to write shorter logic that's easier to read, while still following the original core Redux behavior and data flow.

Logo

You can find the official logo on GitHub.

Change Log

This project adheres to Semantic Versioning. Every release, along with the migration instructions, is documented on the GitHub Releases page.

License

MIT