useRef
Learn how to use the useRef Hook in functional components.
We'll cover the following...
The useRef
Hook is used to persist values between renders of a component. It is used to pass a reference to a mutable value that does not cause a rerender when updated. It can also be used to access DOM elements directly. The useRef
Hook is useful when we want to count the number of rerenders caused by an application. We cannot use the useState
Hook to count and store the number of rerenders since the useState
Hook itself causes the component to ...
Access this course and 1400+ top-rated courses and projects.