Using Redux with React

Learn how to use Redux together with React with the help of the large ecosystem of addons available.

We’ve now covered how to create a store, how to dispatch actions, what exactly reducers do, and how we can use middleware. So far, we haven’t looked at how Redux interacts with React, so let’s do that now.

react-redux package can be used to make Redux work with React. This package includes the “Official React bindings for Redux,” which was originally developed by Dan Abramov (now part of the React Core Team). The package is maintained by the Redux community.

The package consists of two components: one component and a function that will create a higher-order component. The Provider component forms the entry point for Redux. We can wrap the component tree with a Provider component and then access a common store via the connect() ...