Most Common Use Case: Starting AJAX calls to load in data for your component.
React Lifecycle Methods- how and when to use them
Scott Domes

I don’t think making ajax calls within componentWillMount is particularly bad, you can pre “fetch” the data here and when component gets mounted you can “load this data. Considering several metrics like page load time, time to first meaningful paint I would prefer making this ajax calls within componentWillMount instead of componentDidMount.

Show your support

Clapping shows how much you appreciated Sriharsha Sistalam’s story.