What is React.memo - It's not useMemo
Dave Gray Dave Gray
339K subscribers
8,705 views
452

 Published On Jun 24, 2022

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 ➜   / 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:    • React JS Full Course for Beginners | ...  

👀 Here is a React useMemo tutorial:    • useMemo Explained | React Hooks useMe...  

📬 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.ht...

🔗 ES7 React JS Snippets Extension for VS Code:
https://marketplace.visualstudio.com/...

🔗 React Dev Tools Extension for Chrome:
https://chrome.google.com/webstore/de...

📚 General React References:
ReactJS Official site: https://reactjs.org/
React Wikipedia: https://en.wikipedia.org/wiki/React_(...)
React Jobs: https://www.ziprecruiter.com/candidat...

✅ Follow Me:
Github: https://github.com/gitdagray
Twitter:   / yesdavidgray  
LinkedIn:   / davidagray  
Blog: https://yesdavidgray.com
Reddit:   / daveoneleven  

Was this React.memo tutorial helpful? If so, please share. Let me know your thoughts in the comments.

#react #memo #usememo

show more

Share/Embed