React.memo, useMemo and useCallback
useMemo - The Hook returns a memoized value. React.memo - Causes React to skip rendering a component if its props have not changed. useCallback - The Hook returns a memoized callback function.
Loading video...
useMemo Hook in React (in Hindi)
Concepts
1

useMemo Hook in React (in Hindi)
2

React.memo & useCallback Hook in React (in Hindi)
Watch the full video to earn 3
Quizzes
1
What are the use-cases for useMemo?
Question 1 of 6
1
per question2
What are the use-cases for useCallback?
Question 1 of 6
1
per question3
What are differences between React.memo()
and useMemo()
?
Question 1 of 6
1
per question4
If a function component should always render the same way given the same props, what is a simple performance optimization available for it?
Question 1 of 6
1
per question5
React.memo()
is a higher order component?
Question 1 of 6
1
per question6
Your component contains:
const memoizedValue = useMemo(() => computeExpensiveValue(a, b), [a, b]);
For a while the memoizedValue
was of value 12.
After changing route your component with above code is unmounted & becomes offscreen. User decides to go back to the previous route after a while. What will happen to the memoizedValue
?
Question 1 of 6
1
per question