title: How target DOM with react useRef in map
body: <p>I looking for a solution about get an array of DOM elements with react <code>useRef()</code> hook.</p>
  
  <p>example: </p>
  
  <pre><code>const Component = () =&gt; 
  {
  
    // In `items`, I would like to get an array of DOM element
    let items = useRef(null);
  
    return &lt;ul&gt;
      {['left', 'right'].map((el, i) =&gt;
        &lt;li key={i} ref={items} children={el} /&gt;
      )}
    &lt;/ul&gt;
  }
  </code></pre>
  
  <p>How can I achieve this? </p>