4IT580: Docs
4IT580 WebGitLab

7th Practical Class:
useEffect

React Component Lifecycle

hook

Effect on Mount

Effect on Mount & Update

Whenever the values in the dependency array change, the effect is re-run.

Effect Cleanup

React will call your cleanup function each time before the effect runs again, and one final time when the component unmounts (gets removed).

Unmount

After Update & Unmount

Behavior inside

👉 <StrictMode> in Docs

Quacker Demo

Resources