All jobs / Frontend / web developer / React

Frontend / web developer interview question · 0–1 years

What is useEffect for?

The strongest answer

Running side effects after render — fetching data, subscribing, syncing with something outside React — with a cleanup function and a dependency list that says when to run again

Why it works

Right. After render, for things React itself does not do.

What a good answer covers

Answers that fall short

Who gets asked this

More React questions