Design Patterns · Junior · Question 23 of 75

What is a Memento for?

Explanation

A memento stores state without exposing the object's internals. Change history in an editor or the Redux DevTools "time machine" are examples. With immutable data, a memento is simply a reference to a previous version.

Further reading

Problem with a question

Design Patterns · Junior · question 23

Test yourself

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

Take this quiz