2

What is the use of UseMemo

 2 years ago
source link: https://dev.to/johnbabu021/what-is-the-use-of-usememo-4aee
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

What is the use of UseMemo

useMemo is a memorise hook that avoid rendering a Component if there is no change in props
let's take an example when a parent child renders all of it's children component will render but we can avoid rendering of children if there is no change in the props by wrapping
it with a React.useMemo hook


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK