title: Return multiple values in switch case using react.js
body: <p>I am using a switch case to render text based on the case value. In addition to the text, I also want to add an icon. So for a particular case, there would be an icon and next to it there would be an appropriate text.</p>
  
  <p><a href="https://i.stack.imgur.com/Z2U6p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Z2U6p.png" alt="enter image description here"></a></p>
  
  <p>To implement that, I am adding icon and text in return statement of case condition.</p>
  
  <pre><code>     case 'DENIED':
         return &lt;Square /&gt; + intl.formatMessage(messages.processDenied);
       case 'CANCELLED':
         return &lt;CloseIcon color='red' /&gt; + intl.formatMessage(messages.processCancelled);
       case 'INCOMPLETE':
         return &lt;HourglassIcon /&gt; + intl.formatMessage(messages.processIncomplete);
       default:
          return intl.formatMessage(messages.processApproved);
  }
  </code></pre>
  
  <p>When I use the above logic, I get </p>
  
  <p><a href="https://i.stack.imgur.com/Ephcm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ephcm.png" alt="enter image description here"></a></p>
  
  <p>Instead of displaying icon, it displays [object,object]. Can I not use '+' sign to concatenate two elements ? If so, how do I return both the elements in a single return?</p>