Let's add Redux to our project, in order to test it. You already know how to add JavaScript dependencies as follows:
yarn add react-redux--exact
Let's add Redux to our project, in order to test it. You already know how to add JavaScript dependencies as follows:
yarn add react-redux--exact
Action creators are pretty easy to test. We already explored what action creators are and how to use them in Chapter 1, Understanding Redux. As a reminder, in Redux, action creators are simply functions that return plain objects. Nothing complicated, right? Let's consider an action creator from our health application. We just made a function called addNewDoctor that takes new doctor data and returns the plain object, as follows:
export function addNewDoctor(newDoctorData) {
return {
type: "ADD_NEW_DOCTOR",
newDoctorData...