mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-24 12:04:57 +01:00
9 lines
337 B
Markdown
9 lines
337 B
Markdown
|
# 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
|