title: React - how to create attributes dynamically
body: <p>I have 2 attributes connected to 2 props: <code>aria-hidden</code> and <code>aria-label</code>.<br>
  When <code>aria-hidden</code> is true, it only shows that one. If it's false, it shows only <code>aria-label</code>.</p>
  
  <p>I wrote this code but it's not DRY... How can I improve it?</p>
  
  <pre><code> render() {
       let svgMarkup = '';
  
          if (this.props.hidden) {
              svgMarkup = (
                  &lt;svg role="img" aria-hidden="true"&gt;
                      ...
                  &lt;/svg&gt;
              );
          } else {
              svgMarkup = (
                  &lt;svg role="img" aria-label={ this.props.label }&gt;
                      ...
                  &lt;/svg&gt;
              );
          }
  
          return svgMarkup;
   }
  </code></pre>