Summary
In this chapter, we first learned about actions, reducers, and Reducer Hooks. We also learned when we should use Reducer Hooks instead of State Hooks. Then, we replaced our existing global State Hook for the posts
state with a Reducer Hook. Next, we learned about Effect Hooks, and how they can be used instead of componentDidMount
and componentDidUpdate
life cycle methods. Finally, we implemented role verification in our blog app by using an Effect Hook.
In the next chapter, we are going to learn about React Context, and how to use it with Hooks. Then, we are going to add Context Hooks to our app, to avoid having to pass down props over multiple layers of components.