Questions
To recap what we have learned in this chapter, try to answer the following questions:
- How can we extract a custom Hook from existing code?
- What is the advantage of creating custom Hooks?
- When should we extract functionality into a custom Hook?
- How do we use custom Hooks?
- Which library can we use to test custom Hooks?
- How are actions performed by Hooks tested?
- How can we test Hooks that make use of React Context?
- How can we test Hooks that perform asynchronous operations?