useRef

The useRef hook in React works similarly to the useState hook, but with a few key differences. The main difference between useRef and useState is that useRef does not cause re-renders of the component, while useState will trigger a re-render every time it is updated. This makes useRef a useful tool for storing and accessing values that don't need to trigger re-renders, such as a DOM element or an instance of an object.