Hooks serve to reuse logic in functional components. Their name always starts with the "use" word. They cannot be executed conditionally. The component which contains the hook treats the logic inside the hook as if it were its own, preserving reactivity.
  • The component has triggered a re-render
  • The component has been mounted