Co-authored-by: nilbuild <4921183+nilbuild@users.noreply.github.com>
732 B
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: