title: Different way to render an icon REACTJS
body: <p>I have that error in SonarQube: Remove the declaration of the unused 'Ico' variable.</p>
  <p>And thats my code:</p>
  <pre><code>const ReactPage = (props) =&gt; {
      const {nomeCLasse} = props
      const icon = {};
       icon[opcaoAvaliacao.Satisfeito] = InsertEmoticonRoundedIcon;
       icon[opcaoAvaliacao.Neutro] = SentimentSatisfiedRoundedIcon;
      
       const render = () =&gt; {
          const Ico = icon[nomeClasse];
          return &lt;Ico className={`iconeDescricao${nomeClasse}`} /&gt;;
        };
  }
  </code></pre>
  <p>When I render this way the sonar gives me an error on line 5(const Ico = icon[nomeClasse]).</p>
  <p>How do I render an icon in a different way than this with this icon dictionary?</p>