What is React.memo - It's not useMemo
Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap What is React.memo? No, it's not the useMemo React hook. It is a different React optimization available for your React app components. The React memo function is a higher order function that applies a shallow comparison to component props. π Support me on Patreon β https://patreon.com/davegray β Become a full-stack web dev with Zero To Mastery Courses: - Advanced React: https://bit.ly/AdvReactDev - Jr to Senior Web Dev Roadmap: https://bit.ly/WebDevRoadmap-JrtoSr - Master FAANG Coding Interviews: https://bit.ly/FAANGInterview π© Subscribe β https://bit.ly/3nGHmNn π React JS for Beginners full course - 9 hours: https://youtu.be/RVFAyFWO4go π Here is a React useMemo tutorial: https://youtu.be/oR8gUi1LfWY π¬ Course Updates β https://courses.davegray.codes/ π Starter & Completed Source Code: https://github.com/gitdagray/react_memo What is React.memo - It's not useMemo (00:00) Intro (00:33) Welcome (00:46) Starter Code and Dependencies (02:25) Extract the TodoItem component (06:45) Profiling the app with React Dev Tools (07:45) React.memo - What it is and how to apply it (09:26) Check improvements with Profiler (10:28) Shallow comparisons and the Custom Comparison Function (12:53) 3rd Profile for the win! (14:04) When to use React.memo (14:53) Make React.memo just memo β Buy Me A Coffee: https://www.buymeacoffee.com/davegray π Tutorial References: π React.memo docs: https://reactjs.org/docs/react-api.html#reactmemo π 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 π General React 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 React.memo tutorial helpful? If so, please share. Let me know your thoughts in the comments. #react #memo #usememo
Download
1 formatsVideo Formats
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.