title: Why setState not set appending my array into state?
body: <p>I have to create a text area which taken multiple links then I <code>split()</code> into array yeah Its working fine, but I want to set that array into my <code>state</code> in <code>linkList: []</code> but when I click to button for submitting it gives me empty array as I initialize. but when I again press to submit button then it gives me my desired list, why? here are code and outputs</p>
  
  <pre><code>onSubmit = event =&gt; {
      this.setState({ loading: true, host: undefined });
      const { text, linkList } = this.state;
  
      console.log(text);
      const mList = text.split("\n").filter(String);
      console.log(mList);
      this.setState({
        linkList: [...mList]
      });
      console.log(linkList);
  
      event.preventDefault();
    };
  </code></pre>
  
  <p>Output console (First Click)</p>
  
  <pre><code>youtube.com
  google.com
  facebook.com
  ------------------------------------------------------------
  ["youtube.com", "google.com", "facebook.com"]
  ------------------------------------------------------------
  []
  </code></pre>
  
  <p>Output Console (Second Click)</p>
  
  <pre><code>youtube.com
  google.com
  facebook.com
  --------------------------------------------- 
  ["youtube.com", "google.com", "facebook.com"]
  ---------------------------------------------
  ["youtube.com", "google.com", "facebook.com"]
  </code></pre>