useCallback for re-renders: remove most of them

Developer Way
Developer Way
6.7 هزار بار بازدید - پارسال - 👉 Advanced React Book:
👉 Advanced React Book: https://www.advanced-react.com

👉 Comprehensive guide on React re-renders (https://www.developerway.com/posts/re...)
👉 How to useMemo and useCallback: you can remove most of them (https://www.developerway.com/posts/ho...)
👉 The mystery of React Element, children, parents and re-renders (https://www.developerway.com/posts/re...)

💬 Twitter: Twitter: adevnadia
💬 Linkedin: LinkedIn: adevnadia

👩🏼‍💻 Example 1 & 2: https://codesandbox.io/s/example1-2-w...
👩🏼‍💻 Example 3: https://codesandbox.io/s/example-3-cl...
👩🏼‍💻 Example 4: https://codesandbox.io/s/example-4-e3...
👩🏼‍💻 Example 5: https://codesandbox.io/s/example-5-hs...
👩🏼‍💻 Example 5 (fixed): https://codesandbox.io/s/example-5-fi...

Have you ever felt that your code is buried under the incomprehensible wall of useMemo and useCallback hooks? Do we even need all of them? Can I just remove them all?

Good news: you can!

In this video: looking at the very common code patterns where useMemo, useCallback or React.memo do nothing, understanding the purpose of those hooks, and why they can be just removed.

#react #reactjs #webdevelopment #programming #frontend #frontenddeveloper #js #javascript
پارسال در تاریخ 1401/12/17 منتشر شده است.
6,703 بـار بازدید شده
... بیشتر