The useRef hook is primarily used to reference DOM elements in React, allowing access to the underlying DOM nodes of rendered components without causing re-renders.