How to record states in a non-destructive way.

Event sourcing

Event sourcing

Example in the Github repo