Rules of Hooks
In the previous chapter we learned about using various Hooks that have been developed by the React community, as well as where to find more of them.
In this chapter, we are going to learn about everything that there is to know and watch out for when using Hooks. We are also going to learn what we need to know to start developing our own Hooks. Hooks have certain limitations regarding the places and the order that they are defined in. Violating the rules of Hooks can cause bugs or unexpected behavior, so we need to make sure that we learn and enforce the rules.
The following topics will be covered in this chapter:
- Using Hooks
- Order of Hooks
- Names of Hooks
- Enforcing the rules of Hooks