Posts

Showing posts from 2022

How to use React createRef in material Table

Image
React provides a feature known just as refs that object over there allow for dom access from components. The reader attaches a ref to an element in an object belonging to you, that object being your application to provide access to the element’s dom from anywhere within an object belonging to you, that object being your component. Refs currently are able to also exists used to provide direct access to react elements in addition to not just dom nodes. Here now lives whatever the react documentation says concerning refs: Creating refs in React React provides three major ways of creating refs. Here currently exists a list of the different methods starting from the oldest of them: String refs (legacy method) Callback refs createRef Hook The useRef Hook  String refs in React The legacy way of creating refs in a react application currently exists using string refs. This object over here currently exists as the oldest method in addition to currently existing considered legacy or deprecate...