title: using switch statement for react rendering
body: <p>I'm currently doing this to conditionally render certain Components:</p>
  
  <pre><code>render() {
      return (
          &lt;React.Fragment&gt;
              &lt;div id="call_notes_app" className="row"&gt;
                  &lt;NavTree onNavChange={this.changeActiveGroup} /&gt;
                  {this.state.shownGroup == 1 &amp;&amp; &lt;DiscoveryGroup/&gt;}
                  {this.state.shownGroup == 2 &amp;&amp; &lt;FinancialGroup/&gt;}
                  {this.state.shownGroup == 3 &amp;&amp; &lt;SalesStuffGroup/&gt;}
              &lt;/div&gt;
          &lt;/React.Fragment&gt;
      );
  }
  </code></pre>
  
  <p>When I try to use a <code>switch</code> statement, it doesn't work (I get ERROR ABORT in the console):</p>
  
  <pre><code>render() {
      return (
          &lt;React.Fragment&gt;
              &lt;div id="call_notes_app" className="row"&gt;
                  &lt;NavTree onNavChange={this.changeActiveGroup} /&gt;
  
                  {
                      switch(this.state.shownGroup) {
                          case 1:
                              &lt;DiscoveryGroup/&gt;
                              break;
                          case 2:
                              &lt;FinancialGroup /&gt;
                              break;
                          default:
                              &lt;SalesStuffGroup /&gt;
                      }
                  }
              &lt;/div&gt;
          &lt;/React.Fragment&gt;
      );
  }
  </code></pre>
  
  <p>Is there a way to do this using <code>switch</code>?</p>