3 ms·
You need a reference to each state, but because the components are themselves immutable you can share objects. For example a Document may contain many Blocks wh
by underwater 9y ago
You need a reference to each state, but because the components are themselves immutable you can share objects. For example a Document may contain many Blocks which contain many Lines. Changing a Line means replacing that object, its parent Block and its parent Document, but references to everything else can be copied over.