Earlier, refs were only limited to class components but now it can also be accessible in function components through the useRef Hook in React. The refs are used for: