title: How to use ternary operator for the jsx?
body: <p>Hi i want to use the ternary operator for rendering the jsx.</p>
  
  <p>What i am trying to do?
  I have to render two components namely ParentComponent and ChildComponent based on some conditions being true.</p>
  
  <p>ParentComponent should be rendered when variable_1 and variable_2 is true. and ChildComponent should be rendered when variable_1 is true and variable_2 is false.</p>
  
  <p>I have tried below,</p>
  
  <pre><code>render = () =&gt; {
      return (
          {variable_2
              ? &lt;ParentComponent/&gt;
              : &lt;ChildComponent/&gt;
          }
      )
  }
  </code></pre>
  
  <p>in the above code, i have included only the variable_2. how do i also check for variable_1 using ternary operator.</p>
  
  <p>Could someone help me with this. thanks.</p>