title: How to use switch cases inside JSX: ReactJS
body: <p>I have four components imported in my react app. How can i render one of the component conditionally (based on props). This is what i'm trying to do</p>
  
  <pre><code>&lt;ReactSVGPanZoom
        //switch(this.props.Selected){
        // case '1': render &lt;ComponentOne/&gt;; break;
        // case '2': render &lt;ComponentTwo/&gt;; break;
        // case '3': render &lt;ComponentThree/&gt;; break;
        // case '4': render &lt;ComponentFour/&gt;; break;
        // default: render &lt;ComponentOne/&gt;
          }
  &lt;/ReactSVGPanZoom&gt;
  </code></pre>