-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Is your feature request related to a problem? Please describe.
A lot of the data stored on the page is queried more often then it needs to be, and only stored in localstorage.
Describe the solution you'd like
See if it's possible to use a loadable atom to track global state, such that:
- the atom config is stored in KV as a JSON object
- the
loadableutil helps track state of atom- if loading, return current value, show status/spinner? race condition? by back-end?
- fetch on backend for base atom(s), derive atom used for state in app
- if hasData and
lastBlock < currentBlock, update, set, return value - if hasError, retain last value, return last value, log? show?
- if loading, return current value, show status/spinner? race condition? by back-end?
- the front-end reads/loads the data from KV, and can trigger loading on mismatch
- make sure loading operation can only fire once until state updated
Describe alternatives you've considered
It works as-is, but this model would help bring in more data from the contracts, and set a foundation for exposing more data in the UI.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels