title: Reactjs How to stop the loop
body: <p>I've been wondering how to stop your loop, like <code>break</code> in some programming languages but in React js seems don't working.</p>
  
  <p>something like this:</p>
  
  <pre><code>loop(){
    if(){
      //meet the if statement end the loop.
      break;  //not working.
    }
  }
  </code></pre>
  
  <p>no actually the loop is a fetch from the server using aPI.</p>