current
, which you can read or set.useRef
Hook.current
value does not trigger a re-render.ref.current
during rendering. This makes your component hard to predict.ref
attributeref
JSX attribute relates to the useRef
HookmyRef.current
by passing <div ref={myRef}>
.forwardRef
and passing the second ref
argument down to a specific node.