React on page load hook

React on page load hook

If you feel like you have a decent grasp on how the Effect Hook works, or if you feel overwhelmed, you can jump to the next page about Rules of Hooks now. I am using hooks. Hooks are a new addition in React 16.Hooks let you use different React features from your components.

focus(); In the example above, the useRef hook is used to create a reference to the input element, and the useEffect .To add a