Introduction
Throughout this book, one key React feature has been referenced repeatedly in many different variations. That feature is React Hooks.
Hooks power almost all core functionalities and concepts offered by React—from state management in a single component to accessing cross-component state (context) in multiple components. They enable you to access JSX elements via refs and allow you to handle side effects inside of component functions.
Without Hooks, modern React would not work, and building feature-rich applications would be impossible.
Thus far, only built-in Hooks have been introduced and used. However, you can build your own custom Hooks as well. In this chapter, you will learn why you might want to do this and how it works.