title: How to create and assign a variable within a map() which is in render()?
body: <p>Below is the code I am working on (I have trimmed it down to make it readable). </p>
  
  <pre><code>  render() {
      return (
        &lt;Table.Row&gt;
  
          { MONTHS.map(month =&gt; [ // live forecast, actuals and vs forecasts cells per month
            &lt;Table.Cell className="live-forecast-cell"&gt;
              &lt;Input
                ref={el =&gt; { this.inputRef[uuid()] = el; }}
                onFocus={e =&gt; this.handleLiveForecastFocus(supplierName, month, e)}
              /&gt;
            &lt;/Table.Cell&gt;,
          ]) }
        &lt;/Table.Row&gt;
      );
    }
  </code></pre>
  
  <p>In the map operation, I generate a <a href="https://www.npmjs.com/package/uuid" rel="nofollow noreferrer">uuid()</a> value for the ref. I need to then pass this same ref value to the onFocus handler method. How can I achieve this? Appreciate any advice.</p>