Rules of React

The official rules React code must follow: components and hooks are pure, React calls components and hooks, and the Rules of Hooks apply.

In more detail

They let React render in any order, repeat or skip work safely. The React Compiler depends on them and skips optimising any code that breaks them.

Related terms

Taught in

References