Skip to content
Engineering

Hooks

Definition

Hooks are points where code can plug custom behavior into a program or framework without changing its source, such as running a function when an event occurs. In React, hooks such as useState and useEffect let components use state and side effects.

Worked example