title: Please explain to me this weird React syntax
body: <p>I am not able to find what this React syntax means:</p>
  
  <pre><code>useRef&lt;Position[]&gt;([]).current
  </code></pre>
  
  <p>I was trying to understand some code I found in a function:</p>
  
  <pre><code>export const Example = () =&gt; {
    const [colors, setColors] = useState(initialColors);
  
    // We need to collect an array of height and position data for all of this component's
    // `Item` children, so we can later us that in calculations to decide when a dragging
    // `Item` should swap places with its siblings.
    const positions = useRef&lt;Position[]&gt;([]).current;
    const setPosition = (i: number, offset: Position) =&gt; (positions[i] = offset);
  
    // Find the ideal index for a dragging item based on its position in the array, and its
    // current drag offset. If it's different to its current index, we swap this item with that
    // sibling.
    const moveItem = (i: number, dragOffset: number) =&gt; {
      const targetIndex = findIndex(i, dragOffset, positions);
      if (targetIndex !== i) setColors(move(colors, i, targetIndex));
    };
  
    return (
      &lt;ul&gt;
        {colors.map((color, i) =&gt; (
          &lt;Item
            key={color}
            i={i}
            color={color}
            setPosition={setPosition}
            moveItem={moveItem}
          /&gt;
        ))}
      &lt;/ul&gt;
    );
  };
  </code></pre>
  
  <p>The code was in this <a href="https://codesandbox.io/s/framer-motion-drag-to-reorder-pkm1k?from-embed" rel="nofollow noreferrer">codesandbox example</a> in Example.tsx.</p>