337 B
337 B
General Pattern of implementing a persisted network call
- do network request
- start transaction
- write result of network request into transaction store, keeping differences from previous store state in local variables
- close transaction
- apply differences applied to store to in-memory data
- emit events for changes