lesson 14: Understanding React Hooks: Memoization: memo, useMemo, useCallback

preview_player
Показать описание
lesson-14: Understanding React Hooks: Memoization: memo(), useMemo(), useCallback()

. What is Memoization in React.
. How can we optimize React Application
. How to reduce extra re-rendering in react application
. Why do we need to use memo() HOC (higher order Component)
. Why do we need to use useMemo() hook
. Why do we need to use useCallback() hook
. What is cache memory
. What happend if we use memo() HOC for optimize react app more that need to.
. What is the drawback of Memoization in React
. What is the side-effect of Memoization in React

Memoization / Memo:
- Memoization is an optimization technique for accelerating computer programs by caching the
results of heavy function calls and returning them when similar inputs are encountered repeatedly.

useMemo():
- useMemo lets you cache value of variables between re-renders.

useCallback():
- useMemo lets you cache function between re-renders.

Why we need `memo()` ?
- When any state change, by hooks, then entire component re-render, so if child component also
re-render even though child component no need to re-render.

To Solve this problem pass child component inside `memo( SelfComponent )` that way, child
component used as cache.

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Music: Ambient Corporate by RinkevichMusic
Video Link: • RinkevichMusic - ...
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Рекомендации по теме