“Ref” has two, related meanings in React, confusingly so. So before we start, let’s get this out of the way: The “ref object” returned by the useRef hook: a plain JavaScript object with a single property named current, which you can read or set to any value 1. Host elements — JSX representing DOM elements — have a special “ref attribute” that can be used to access its corresponding DOM element 1.