ReplyFeb 27, 2018
Calling an Ajax method (and THEN calling setState when it completes) is not the same thing as calling setState directly in componentDidMount. The gist of the initial advice is don't call setState in componentDidMount. Kicking off an async process (ajax call) that calls setState will do it AFTER componentDidMount has finished (and should therefore trigger componentDidUpdate, rather than forceUpdate. Yes? https://medium.com/@baphemot/understanding-reactjs-component-life-cycle-823a640b3e8d DO cause side effects (AJAX calls etc.) DON’T call this.setState as it will result in a re-render