mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
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