title: Can not call setState out of componentDidMount
body: <p>I alway got message: </p>
  
  <blockquote>
    <p>Warning: setState(...): Can only update a mounted or mounting
    component. This usually means you called setState() on an unmounted
    component. This is a no-op. Please check the code for the Admin
    component.</p>
  </blockquote>
  
  <p>When I using <code>setState</code> outside <code>componentDidMount</code> function.</p>
  
  <p>This is my source code:</p>
  
  <pre><code>class Admin extends React.Component {
      constructor(props) {
          super(props);
          this.state = {
              mainModal: false,
              itemId: null,
              bulkRemove: true,
              params: {},
              defaultRole: null,
              dataLoaded: store.getState().adminReducer.list.length?true:false
          };
          this.list = this.list.bind(this);
          this.toggleModal = this.toggleModal.bind(this);
          this.handleFilter = this.handleFilter.bind(this);
          this.handleCheck = this.handleCheck.bind(this);
          this.handleCheckAll = this.handleCheckAll.bind(this);
          this.handleRemove = this.handleRemove.bind(this);
          this.handleChange = this.handleChange.bind(this);
          this.handlePageChange = this.handlePageChange.bind(this);
  
          this.filterTimeout = null;
      }
  
      componentDidMount(){
          ...
          this.list();
          // this.setState({dataLoaded: true}); // OK when call here
          ...
      }
  
      list(outerParams={}, page=1){
          let params = {
             page
          };
  
          if(!isEmpty(outerParams)){
              params = {...params, ...outerParams};
          }
  
          Tools.apiCall(apiUrls.list, params, false).then((result) =&gt; {
              if(result.success){
                  console.log(this);
                  // output of above console.log -&gt; Admin {props: Object, context: undefined, refs: Object, updater: Object, state: Object…}
                  // this.setState({dataLoaded: true}); // Error when call here or inside setInitData function
                  this.setInitData(result);
              }
          });
      }
  }
  </code></pre>
  
  <p>When I use babel preset <code>es2015</code> then everything ok, but same error with <code>es2016</code> or <code>es2017</code>. </p>