mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
some notes on the general idea of persisting network calls in brawl
This commit is contained in:
parent
b8eea881f8
commit
089d2fe430
8
doc/persisted-network-calls.md
Normal file
8
doc/persisted-network-calls.md
Normal file
@ -0,0 +1,8 @@
|
||||
# General Pattern of implementing a persisted network call
|
||||
|
||||
1. do network request
|
||||
1. start transaction
|
||||
1. write result of network request into transaction store, keeping differences from previous store state in local variables
|
||||
1. close transaction
|
||||
1. apply differences applied to store to in-memory data
|
||||
1. emit events for changes
|
Loading…
Reference in New Issue
Block a user