← React Beginner Questions - Set 12 Q114
What is the significance of the `componentDidMount` lifecycle method?
React Beginner Questions - Set 12
Example
1
componentDidMount() { this.fetchUser(this.props.id); }
What to notice
- Runs once after the first render — the class equivalent of `useEffect(…, [])`.
← Back to the question list