Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap
useImperativeHandle is explained with an example in this React hooks tutorial. useImperativeHandle is a React hook that should not be used often, but it does have some specific use cases. In this tutorial, we will look at how a web page modal can be one of the use cases.
Subscribe https://bit.ly/3nGHmNn
React JS for Beginners full course - 9 hours: https://youtu.be/RVFAyFWO4go
Source Code: https://github.com/gitdagray/useimperativehandle_tut
Course Updates https://courses.davegray.codes/
useImperativeHandle Explained with an Example | React Hooks Tutorial
(00:00) Intro
(00:14) Welcome and setup
(00:35) What is useImperativeHandle?
(00:55) The parent component
(02:49) The modal component
(06:24) Rendering the modal and not the parent
(07:28) The docs and use cases for useImperativeHandle
ES7 React JS Snippets Extension for VS Code:
https://marketplace.visualstudio.com/items?itemName=dsznajder.es7-react-js-snippets
React Dev Tools Extension for Chrome:
https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi
References:
ReactJS Official site: https://reactjs.org/
React Wikipedia: https://en.wikipedia.org/wiki/React_(JavaScript_library)
React Jobs: https://www.ziprecruiter.com/candidate/search?search=react&location=
Follow Me:
Github: https://github.com/gitdagray
Twitter: https://twitter.com/yesdavidgray
LinkedIn: https://www.linkedin.com/in/davidagray/
Blog: https://yesdavidgray.com
Reddit: https://www.reddit.com/user/DaveOnEleven
Was this tutorial about the React hook useImperativeHandle helpful? If so, please share. Let me know your thoughts in the comments.
#useimperativehandle #react #hooks