Files
developer-roadmap/roadmaps/react/content/creating-custom-hooks@HX75SExuzR5AP7TQ94qid.md

732 B

Writing Custom Hooks

A custom hook is a function you write yourself that starts with "use" and calls other hooks inside it. It lets you extract reusable logic, such as fetching data or tracking window size, out of a component and share it across multiple components. Custom hooks follow the same rules as built-in hooks, since they are really just regular functions built on top of them.

Visit the following resources to learn more: