← React Intermediate Questions - Set 3 Q26

How do you use refs in React?

React Intermediate Questions - Set 3

Example

const ref = useRef(null);
<input ref={ref} />
ref.current.select();

What to notice

← Back to the question list