React 19+ · Concept
Rules of Hooks
Call ordinary React Hooks only at the top level of function components and custom Hooks. Keep their order unchanged across renders, and place them before early returns.
Last updated
Syntax
useState(initialState); useContext(context); useEffect(setup, dependencies);In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
Rules of ReactComponents and Hooks must be pureuseeslint-plugin-react-hooks rules-of-hooks