title: Can I remove document.getElementById in reactjs?
body: <p>Can I change the prop <code>value</code> without</p>
  <pre><code>document.getElementById(objRef.uid + &quot;_size&quot; ).value = val
  </code></pre>
  <p>note that these dropdowns are being made in a for loop, and there are thousands of them.</p>
  <pre><code>&lt;DropDownMenu 
      id={objRef.uid + &quot;_size&quot;} 
      setValue={( val ) =&gt; { document.getElementById( objRef.uid + &quot;_size&quot; ).value = val }} 
      value={objRef.size} 
      colors={[&quot;bg-red-500&quot;, &quot;bg-yellow-400&quot;, &quot;bg-emerald-400&quot;]} 
      options={[&quot;Small&quot;, &quot;Medium&quot;, &quot;Large&quot;]} /&gt;
  </code></pre>