title: React JS: Syntax error: Unexpected token
body: <p>I've been using this code</p>
  
  <pre><code>{this.state.display === true ?
        this.state.content.map((q) =&gt; {
          &lt;Content
            id={q.id}
            key={q.id}
            content={q.content}
            deleteRow={this.deleteRow()}
          /&gt;
        })
        &lt;AppForm /&gt;
  </code></pre>
  
  <p>inside my return method in React, everything works aslong as I dont add the AppForm,but when I add AppForm it gives me an error: Syntax error: Unexpected token.</p>
  
  <p>Can you please help me? Thanks.</p>
  
  <hr>
  
  <p>Edited:</p>
  
  <p>I want both Content and AppForm to be shown if the user is logged in (display is true)</p>
  
  <p>Here is my complete render code:</p>
  
  <pre><code>return (
    &lt;div&gt;
      {this.state.display === true ?
        this.state.content.map((q) =&gt; {
          &lt;Content
            id={q.id}
            key={q.id}
            content={q.content}
            deleteRow={this.deleteRow()}
          /&gt;
        })
        &lt;AppForm /&gt;
      : this.state.display === false ?
        &lt;Forms
          create={this.createUser}
          sign={this.signUser}
        /&gt;
      : 'Error'
      }
  &lt;/div&gt;
  );
  </code></pre>