How to use for loop for listing integer in react component?
<p>I have a state named <code>rounds</code> and prop <code>current_round</code>. Default value for current_round is 0. What I want to do with these value is that listing buttons with integer. For example, if value of <code>rounds</code> is 4, listing buttons of 1, 2, 3 and 4.</p>

<pre><code>for (var i =(this.props.order.order.current_round + 1); i&lt;(this.props.order.rounds+1); i++) {

  return (
    &lt;li&gt;&lt;button id ={i} class="rounds_btn"&gt;{i}&lt;/button&gt;&lt;/li&gt;
    );
  }
</code></pre>

<p>So to do that, I made for loop like above, but it only shows one button of integer 1.. </p>

<p>What is wrong with my code? it doesn't show any errors. </p>

<p>Thanks in advance </p>