Skip to content

Glossary: Real-Time Apps with WebSockets

Dependency array

Also written: []

The second argument to `useEffect`. An empty array `[]` means the effect runs once, when the component first appears. Leaving it out makes the effect run after every render.

Where the book teaches it

Related terms

useEffectEffect cleanup