title: Simple for loop in React expects identifier
body: <p>I'm new to react and am trying to implement a simple for loop, as demonstrated in this other <a href="https://stackoverflow.com/questions/22876978/loop-inside-react-jsx">stackoverflow post</a>. However, I cannot seem to make it work. I just want to run the component 5 (or any number of) times rather than map over an array or similar.</p>
  
  <p>DEMO: <a href="https://stackblitz.com/edit/react-ekmvak" rel="nofollow noreferrer">https://stackblitz.com/edit/react-ekmvak</a></p>
  
  <p>Take this example here:</p>
  
  <p>index.js:</p>
  
  <pre><code>import React, { Component } from 'react';
  import { render } from 'react-dom';
  import './style.css';
  import Test from './test';
  
  class App extends Component {
    constructor() {
      super();
      this.state = {
        name: 'React'
      };
    }
  
    render() {
      return (
        &lt;div&gt;
          for (var i=0; i &lt; 5; i++) {
          &lt;Test /&gt;
      } 
        &lt;/div&gt;
      );
    }
  }
  
  render(&lt;App /&gt;, document.getElementById('root'));
  </code></pre>
  
  <p>test.js</p>
  
  <pre><code>import React from "react";
  
  export default function Test() {
    return (
      &lt;p&gt;test&lt;/p&gt;
    );
  }
  </code></pre>
  
  <p>Can anyone tell me where I'm going wrong? I've tried to copy the other stackoverflow post and tried <code>test()</code> also. I still get this error:</p>
  
  <blockquote>
    <p>Error in index.js (18:27) Identifier expected.</p>
  </blockquote>
  
  <p>Thanks for any help here.</p>