Use Ref

The useRef Hook allows you to persist values between renders.
when we use " useState" to declare a variable and then we update that variable the entire component will 100 % rerenderd
we don't need re rendring , when we updae the state value, but component to be constant.
then we have to use "UseRef"
when we update content it won't be rerenderd and also we can do auto focuse using the " UseRef".
useRef() only returns one item. It returns an Object called current.
When we initialize useRef we set the initial value: useRef(0).
In React, we can add a ref attribute to an element to access it directly in the DOM.