Thanks, totally agree with you. I just gave a sort of demo on how refs work. In simple words:
There are controlled and uncontrolled components in React. Libraries or external files which we may use in React come under uncontrolled components.
As the name says, we dont have a control over it via React app, hence we cant use traditional document.getElement queries to manipulate DOM.
Thus, react refs come into the picture to access and manipulate these uncontrolled components.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks, totally agree with you. I just gave a sort of demo on how refs work. In simple words:
There are controlled and uncontrolled components in React. Libraries or external files which we may use in React come under uncontrolled components.
As the name says, we dont have a control over it via React app, hence we cant use traditional document.getElement queries to manipulate DOM.
Thus, react refs come into the picture to access and manipulate these uncontrolled components.