News for hackers. Stuff that matters.
Re:Ask HN: Do you bother making state changes reversible? by Leftium on Friday January 30, 2026 @07:23PM (#46831848)
There are forms of state that are reversible: essentially, you store read-only events instead of writing to existing state.

The main disadvantages are more complexity and performance issues.

Examples:

- Event sourcing: https://youtu.be/8JKjvY4etTY

- CRDT

- At the DB layer: https://www.datomic.com

- You can also do it at the code level (but this is more like keeping copies of the old state): https://immerjs.github.io/immer

There are no comments on this comment yet.