Answer
Custom hooks are functions starting with use that compose built-in hooks to share stateful logic (not state itself — each call site gets its own state).
Rules of Hooks: only call hooks at the top level of React functions or custom hooks; only from React components or other hooks.
Patterns:
useXdata fetching — loading/error/data + abort on unmount.useDebouncedValue— encapsulate debounce + cleanup.useLocalStorage— sync state with storage.usePrevious— track prior prop/state for diffs.