react-redux README

The project's README from github.com/reduxjs/react-redux. As one markdown file: README.md.

React Redux

Official React bindings for Redux. Performant and flexible.

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 is by using our official Redux+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

An Existing React App

React Redux 9.0 requires React 18 or later

To use React Redux with your React app, install it as a dependency:

# If you use npm:
npm install react-redux

# Or if you use Yarn:
yarn add react-redux

You'll also need to install Redux and set up a Redux store in your app.

This assumes that you’re using npm package manager with a module bundler like Webpack or Browserify to consume CommonJS modules.

If you don’t yet use npm or a modern module bundler, and would rather prefer a single-file UMD build that makes ReactRedux available as a global object, you can grab a pre-built version from cdnjs. We don’t recommend this approach for any serious application, as most of the libraries complementary to Redux are only available on npm.

Documentation

The React Redux docs are published at https://react-redux.js.org .

How Does It Work?

The post The History and Implementation of React-Redux explains what it does, how it works, and how the API and implementation have evolved over time.

There's also a Deep Dive into React-Redux talk that covers some of the same material at a higher level.

License

MIT

react-redux (reduxjs/react-redux)

Searching Database…

What is this?The official React bindings for Redux - a library that connects your React components to a Redux store so they can read state and dispatch actions.
Is this Redux itself, or something extra I add on top?It's a library, not Redux itself. You install it alongside Redux, and it handles the React-side plumbing of subscribing components to your store.
How do I add it to an existing React app?Run npm install react-redux, then install Redux and set up a store in your app. It assumes you use npm with a module bundler like Webpack or Browserify.
Will it work with my version of React?React Redux 9.0 requires React 18 or later. The package itself is tiny: its only runtime dependency is use-sync-external-store, and it ships with TypeScript types.
Can I just include it from a CDN with a script tag?A pre-built UMD build is available on cdnjs as a global ReactRedux object, but the README warns against it for serious apps since most complementary Redux libraries are npm-only.
What's the recommended way to start a brand-new app with it?Use the official Redux+TS template for Vite or create a Next.js project with the with-redux template. Both come with Redux Toolkit and React-Redux preconfigured for that build tool, plus a small example app.
Where can I read about how it works under the hood?The 'History and Implementation of React-Redux' post explains what it does and how the API and implementation evolved over time. There is also a Deep Dive talk covering the same material at a higher level.
Is the project still actively maintained?Yes - it lives in the official reduxjs GitHub org, was created in 2015, has 23k+ stars, is not archived, and the repo runs CI workflows for tests, builds and releases.
Creator
reduxjs
Size
14.4 MB
Stars
23.4K
Age
11y
Commits · 90 Days