Loading
A reusable function that bundles React logic you use in multiple places — like a recipe card you pull out whenever you need to cook the same dish.
A function prefixed with 'use' that composes built-in hooks (useState, useEffect, etc.) to extract and share stateful logic across components. Custom hooks do not share state between callers — each call gets its own instance.
Custom hooks are a convention, not a runtime primitive — the 'use' prefix triggers the Rules of Hooks lint plugin to enforce call-order invariants. Internally, each invocation allocates its own fiber hook slots. Custom hooks enable the extraction of complex effect/state coordination (e.g., useQuery, useForm) while preserving composability and testability via dependency injection of external services.