Questions
To recap what we have learned in this chapter, try to answer the following questions:
- What are the common problems with State Hooks?
- What are actions?
- What are reducers?
- When should we use a Reducer Hook instead of a State Hook?
- Which steps are needed to turn a State Hook into a Reducer Hook?
- How could we create actions more easily?
- What is the equivalent of Effect Hooks in class components?
- What are the advantages of using an Effect Hook, versus class components?
- What is the dependency array and how does it work?
- How can cleanup functions be used with Effect Hooks?