Back to Browse

What is React.memo - It's not useMemo

10.2K views
Jun 24, 2022
15:28

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 formats

Video Formats

360pmp426.0 MB

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

What is React.memo - It's not useMemo | NatokHD