Frontend
Hook
A special function that lets a component tap into features like state, effects, and data fetching.
In React, hooks are functions that start with `use` — `useState` gives a component memory, `useEffect` runs code when something changes, and library hooks like `useQuery` fetch data. They're the plumbing that connects your UI to logic and the outside world. Hooks have strict rules (call them at the top level, never inside a loop or an `if`), and breaking those rules is one of the most common errors in AI-generated React — if you see 'invalid hook call,' that's the culprit.