npm install react-redux

Official React bindings for Redux

About react-redux

React Redux is the official set of React bindings for Redux, designed to fully harness the power of Redux's state management capabilities within a React application. This integration not only simplifies the management of state across large applications but also ensures that your components only re-render when necessary, leading to highly performant web applications. React Redux provides a stable, reliable, and scalable solution for developers looking to pair the robust state management of Redux with the dynamic capabilities of React. Key benefits include predictable state updates, centralized state management, and compatibility with the Redux DevTools extension, enhancing developers' ability to debug applications effectively.

To integrate React Redux into your project, you can use the command `npm install react-redux`. This command adds the necessary React bindings to interact seamlessly with Redux, facilitating easier state management in React applications. By installing react-redux, developers can utilize hooks like `useSelector` and `useDispatch`, which simplify the process of reading from and dispatching actions to the Redux store, respectively. These features make `npm install react-redux` a crucial step for developers looking to implement Redux in their React applications, ensuring smoother development and maintenance of stateful logic.

React Redux is not only about efficient state management but also about enhancing the developer experience with features like hot reloading and time-travel debugging. The seamless integration with Redux ensures that developers can maintain and scale applications with complex state requirements without compromising on performance. Whether you are building a small project or a large enterprise-level application, React Redux stands out as an essential tool for modern web development, combining the best of React's UI capabilities with the comprehensive state management of Redux.

More from reduxjs

reduxjs npm packages

Find the best node modules for your project.

Search npm

redux

Predictable state container for JavaScript...

Read more
,

react-redux

Official React bindings for...

Read more
,

@reduxjs/toolkit

The official, opinionated, batteries-included toolset for efficient Redux...

Read more

Dependencies

Core dependencies of this npm package and its dev dependencies.

@types/use-sync-external-store, use-sync-external-store, @babel/cli, @babel/core, @babel/plugin-proposal-decorators, @babel/plugin-proposal-object-rest-spread, @babel/plugin-transform-flow-strip-types, @babel/plugin-transform-react-display-name, @babel/plugin-transform-react-jsx, @babel/plugin-transform-runtime, @babel/preset-env, @babel/preset-typescript, @microsoft/api-extractor, @reduxjs/toolkit, @testing-library/jest-dom, @testing-library/react, @testing-library/react-hooks, @types/node, @types/prop-types, @types/react, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, babel-eslint, codecov, cross-env, eslint, eslint-config-prettier, eslint-plugin-import, eslint-plugin-prettier, eslint-plugin-react, glob, jsdom, prettier, react, react-dom, react-test-renderer, redux, rimraf, tsup, typescript, vitest

Documentation

A README file for the react-redux code repository. View Code

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 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.

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