React Redux

React Redux is the official React UI bindings layer for Redux. It lets your React components read data from a Redux store, and dispatch actions to the store to update the state. It implements many performance optimizations internally so that your own component only re-renders when it needs to.

There are two ways by which React-Redux connects a component to a redux store: 1) connect() or ... 2) hooks.

The recommended way to start new apps with React and Redux is by using the official template for Create React App, which takes advantage of Redux Toolkit and React Redux's integration with React components.

# Redux + Plain JS template npx create-react-app my-app --template redux # Redux + TypeScript template npx create-react-app my-app --template redux-typescript

Alternatively, you can manually install Redux and Redux Toolkit, along with the React binding:

npm install redux @reduxjs/toolkit react-redux npm install --save-dev @redux-devtools/core