title: React JS nested conditions, unexpected error on .map()
body: <p>I'm trying to do nested conditionals to be rendered and one case would make me use <code>.map()</code></p>
  
  <pre><code>renderClasses () {
          if (!this.state.classes.length) {
              console.log(this.state.userType)
              if (this.state.userType) return(&lt;div&gt;Add Class&lt;/div&gt;)
              else return (&lt;div&gt;Join Class&lt;/div&gt;)
          } else {
              return (&lt;div&gt;{
                  this.state.classes.map((class) =&gt; {
                                               ^ unexpected token here 
                      &lt;div&gt;one class&lt;/div&gt;
                  })
              }&lt;/div&gt;)
          }
      }
  
      render() {
          if (!this.state.isLogged) {
              return &lt;Redirect to='/' /&gt;
          }
          return (
              &lt;div&gt;
                  {
                      this.renderClasses()
                  }
              &lt;/div&gt;
          );
      }
  </code></pre>
  
  <p>Am i missing something? i tried wrapping everything into one <code>&lt;div&gt;</code> or maybe I understood it wrong? Thank you in advance</p>