The useRef hook lets you assign a DOM element to a variable, which you can then interact with. In your component's JSX: <div ref={myRef}> .... </div> In your component's Javascript: const myRef = useRef(null); myRef.current.style = 'background-color: red;';

