useRef can only be null, or the element object. I then put the h1Ref variable inside the ref property of my H1 element. Console logging useRef DOM reference ...
確定! 回上一頁