hydrogen-web/doc/persisted-network-calls.md

337 B

General Pattern of implementing a persisted network call

  1. do network request
  2. start transaction
  3. write result of network request into transaction store, keeping differences from previous store state in local variables
  4. close transaction
  5. apply differences applied to store to in-memory data
  6. emit events for changes