Skip to content

Glossary: React Basics

Lazy initial state

Also written: lazy initializer

Passing a function to `useState`, as in `useState(() => loadCart())`, so React calls it only on the first render rather than on every render.

Where the book teaches it

Related terms

useStateInitial value