At this point, we have created some actions for our application--basically, a CRUD of bookmarks. As mentioned previously, actions define that something happened; however, we still need to figure out what to do with the data on the action. By using a reducer, we can define how the data will be stored on the global state.
In this recipe, we will introduce a reducer to set the bookmarks, from the actions defined on the previous recipe, to the global state.
This recipe depends on the previous recipe; make sure to start from the beginning of this chapter to avoid any problems or confusion.
src/redux/modules/bookmarks/reducer.jsfile. Then we need to import all the action types we ...