title: can't use if/else inside react render method
body: <p>I am using React with Ant Design, but this is only a react issue. </p>
  
  <p>I have a code like this: </p>
  
  <pre><code>  {
      title: "Group",
      dataIndex: "group",
      key: "group",
      render: text =&gt; (
       &lt;a&gt; {text} &lt;/a&gt;
      )
    }
  </code></pre>
  
  <p>Not the <code>render: text =&gt; ()</code> which allows me to use html inside a js function (or jsx?)</p>
  
  <p>but, if I try to put if/else logic I get always an error. </p>
  
  <p>Right now I am using something stupid like this: </p>
  
  <pre><code>render: texts =&gt; (
    &lt;span&gt;
       {[""].map(text =&gt; {
        if(texts.includes(":")) {
         return (&lt;b&gt; {texts} &lt;/b&gt;)
        }
      return (&lt;a&gt; {texts} &lt;/a&gt;)
    })}
  &lt;/span&gt;
  </code></pre>
  
  <p>The questions is, is there a way to do it without using <code>[""].map()</code> and why won't simple if/else work</p>