Official React bindings for Redux.
Performant and flexible.
This is a fork of react-redux which enables the user to pass the name of a subscription function used instead of the original store.subscribe function. Other extra parameters are passed as args to this function - this enables us to call only a subset of the original listeners.
The recommended way to start new apps with React Redux is by using the official Redux+JS/TS templates for Create React App, which takes advantage of Redux Toolkit.
# JS
npx create-react-app my-app --template redux
# TS
npx create-react-app my-app --template redux-typescript
React Redux 8.0 requires React 16.8.3 or later (or React Native 0.59 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.
The React Redux docs are published at https://react-redux.js.org .
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.