Back to Browse

useRef and forwardRef in React | Learn useRef hook and forwardRef

1.9K views
Dec 12, 2022
19:17

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: https://twitter.com/izrajesh Instagram: https://www.instagram.com/irajeshbhattarai/ Medium: https://rajeshi.medium.com/ Website: https://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

Download

1 formats

Video Formats

360pmp428.6 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

useRef and forwardRef in React | Learn useRef hook and forwardRef | NatokHD