Hooks are what make modern React applications tick. They’re a pretty small part of the overall React API, but very significant nonetheless. Hooks are also quite tricky to use. In this chapter, we’ll discuss all the hooks, what they do, and some important things to know about using hooks in general.
Hooks are a special kind of creature in the React biosphere. From the outside, they seem completely unrelated in functionality, but when examined closer, they have some common traits and behaviors that we need to account for when using them. You could say that they stem from a common ancestor somewhere in the evolutionary tree, even though they have advanced to become very different beings.
We’ve dedicated this chapter to all the hooks for this very reason. So, while we’re going to be covering some wildly different topics, all of them are concerned with using hooks. We’ll tie a bow on it at the end by explaining how all of these hooks are, in fact, related, despite their seemingly divergent purposes.