What's the difference between a JavaScript function and a React hook?
what it is about hooks that make them hooks and not functions!
Hooks are functions. What's special about them is what their purpose is and when they're supposed to be used. Their purpose is to give you a way to interact with the react component lifecycle, and they are implemented so that they work correctly only if they are called while a functional component is rendering.
The react team has implemented 10 of these functions. They let you do things like manage state or run side effects. You can mix and match these any way you like, and if you put the code into a helper method, this is referred to as a "custom hook".