Book Image

Redux Recipes [Video]

By : MMA DAWOUD
Book Image

Redux Recipes [Video]

By: MMA DAWOUD

Overview of this book

State management is absolutely critical in providing users with a well-crafted experience with minimal bugs. Redux provides a solid, stable, and mature solution to managing state in your React application. In this course, you’ll explore advanced state management techniques, router integration, and other common problems that you might encounter while developing your applications. The recipe-based approach allows you to quickly identify your problem and find a solution to it. This course also consists of various recipes that will help you to understand different test-case scenarios created in Redux. Once you are well-acquainted with Redux, the course will explicitly show you how they work in developing a consistent application with React. The code bundle for this video course is available at https://github.com/PacktPublishing/-Redux-Recipes
Table of Contents (6 chapters)
Chapter 2
Integrating Redux with React
Content Locked
Section 6
Dispatching Actions
We want here to make some changes in the state by dispatching actions, we created a new folder for actions and then start dispatching after mapping dispatch to props in the components in the connect function. - Create actions folder and create types.js file to hold all the actions times as constants and export them - Create action for orders and use the types from types.js file and handle the action in the reducer - Import the action creator to the component and map dispatch to props to be used as props