CreateRef
createRef is a function in React that returns a ref object used to access DOM nodes or component instances directly. The object has a mutable current property, which is null initially and is updated by React when the ref is attached to a element or component.
In class components, you typically create a ref in the constructor, then attach it to a React
In functional components, the recommended approach for persistent values is useRef, not createRef, because createRef would
Compared with callback refs, createRef provides a stable object with a current property that updates when the
Limitations include that refs do not participate in the component’s declarative data flow, and accessing a