React · Middle · Question 3 of 75

What does React.memo(Component) do?

Explanation

memo compares each prop with Object.is. If all are equal, the previous render result is reused. Changes to its own state and context still trigger a render. You can pass a custom comparison function as the second argument.

Further reading

Problem with a question

React · Middle · question 3

Test yourself

Take the React · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz