useRef: This hook is use to manipulate DOM directly. This is use to persist value between rendering of the component. It can contain mutable value that can not cause re-render when their values update.
Example: It is use to focus, change color, get previous states.
for further details visit this link
https://www.w3schools.com/REACT/react_useref.asp
Comments
Post a Comment