Рет қаралды 1,468
The useRef is a React hook that allows you to directly create a reference to the DOM element and returns a ref object with a single current property initially set to the initial value you provided.
In React forwardRef is a method that allows parent components to pass down ref to their children. The forwardRef gives reference to a DOM element created by its parent component to the child component. This then allows the child to read and modify that element anywhere it is being used.
Connect with me:
Twitter: / izrajesh
Instagram: / irajeshbhattarai
Medium: / rajeshi
Website: rajeshbhattarai.com/
Disclaimer:
All videos are for educational purposes and use them wisely. Any video may have a slight mistake, please take decisions based on your research. This video is not forcing anything on you.
#reactjs #reacthooks