Connecting components to an application state

So far, we have the reducer functions that handle creating a new application state, and the action creator functions that trigger our reducer functions. We still need to connect our React components to the Redux store. In this section, you'll learn how to use the connect() function to create a new version of your component that's connected to the Redux store.

Mapping state and action creators to props

The idea with Redux and React integration is that you tell Redux to wrap your component with a stateful component that has its state set when the Redux store changes. All we have to do is write a function that tells Redux how we want state values passed to our component as props. Additionally, we have to ...

Get React 16 Essentials - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.