← React Intermediate Questions - Set 4 Q32

What is the difference between `componentDidMount` and `useEffect`?

React Intermediate Questions - Set 4

Example

componentDidMount() { load(); }
useEffect(() => { load(); }, []);

What to notice

← Back to the question list