Design Patterns · Middle · Question 46 of 75

Which pattern does React.memo or a memoize(fn) function implement?

Explanation

The wrapper has the same interface and intercepts the call: if the inputs haven't changed, it returns the stored result. A caching proxy is a classic application of the Proxy pattern.

Further reading

Problem with a question

Design Patterns · Middle · question 46

Test yourself

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

Take this quiz