← React Intermediate Questions - Set 8 Q73

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

React Intermediate Questions - Set 8

Example

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

What to notice

← Back to the question list