The App component
The first component that we will connect with Redux is the App component, which acts as the parent component to all the other components in our application. This means that, regardless of the URL we visit in our application, the App component will be executed. This makes the App Component the best place to do actions, such as getAllPosts, which will retrieve the posts array.
This section is the most confusing part in Redux, hence, you will have to pay close attention to how we pass the Redux store and actions to the React component as props. Also, make sure that you refer to the completed code files if you face any errors at this stage.
You will need to add a few import statements in your App.js file. The first thing you ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access