Skip to content
masterclass Buddy

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.

Subscribe
  • Rules of React
  • Components and Hooks must be pure
  • use
  • eslint-plugin-react-hooks rules-of-hooks

Source: Rules of Hooks – React API Reference. Checked 2026-11-03.