Storing the State Changes
The next story is to allow the user to create a new list. We can implement it, continuing to use the ToDoListUpdatableFetcher and at some point later replace it with an implementation that uses a database or some other form of persistence.
While this is a completely valid and sensible approach and has its uses, for Zettai we’re going to take a different approach. Rather than storing the state directly, we want to store all the changes in the state, and then recreate the state when we need it, replaying all the changes.
It may seem an unneeded complication, but its benefits will become clear before the end of this chapter.
This is a big change from the normal way of developing applications, and we also need to use functional ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access