early return

Leaving a function before its end with a return statement, usually after checking a condition.

In more detail

Normal hooks must not come after an early return, because they would be skipped in some renders. The use API is allowed there.

Related terms

Taught in

References