reduxjs /redux

A JS library for predictable global state management

★ 61,439⑂ 15,091👁 1,259⑃ 2,691● 2,085▤ 78◈ 75
TypeScriptMITCreated 2015-05-29redux.js.org
61,439
stars
+-1
15,091
forks
1,259
watchers
2,691
prs
2,085
issues
78
releases
75
discussions

README

Redux

Redux is a JS library for predictable and maintainable global state management.

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






 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.

bash
 Vite with our Redux+TS template
 (using the tiged tool to clone and extract the template)
npx tiged 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


For React Native, we have an official Redux+TS template for Expo:

bash
npx tiged reduxjs/redux-templates/packages/expo-template-redux-typescript my-app



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:

- Introduction
- Tutorials
- Usage Guides
- FAQ
- API Reference

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

Top issues

Discussions

Latest release

v5.0.1 v5.0.1 2023-12-23
This patch release adjusts the isPlainObject util to allow objects created via Object.create(null), and fixes a type issue which accidentally made the store state type non-nullable.

 What's Changed
 fix(isPlainObject):  support check Object.create(null) by @zhe-he in https://github.com/reduxjs/redux/pull/4633
 fix(types/store): Unexpectedly narrowed return type of function Store['getState'] by @exuanbo in https://github.com/reduxjs/redux/pull/4638

Full Changelog: https://github.com/reduxjs/redux/compare/v5.0.0...v5.0.1

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON