← React Intermediate Questions - Set 9 Q81

What is the purpose of `useEffect` in React?

React Intermediate Questions - Set 9

Example

useEffect(() => { const t = setTimeout(save, 500); return () => clearTimeout(t); }, [draft]);

What to notice

← Back to the question list