holochain-open-dev / holochain-open-dev/infrastructure
Follow-up liveLinkStore first fetch with regular fetch immediately
- Dominant language
- TypeScript
- Stars
- 7
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
I don't have permissions to make a pull request, but I would suggest something like this on main-0.5 in packages/stores/src/holochain.ts:485
```
const fetch = async () => {
if (!active) return;
if (isFirstFetch) {
isFirstFetch = false
const firstLinks = await firstFetchLinks();
maybeSet(firstLinks);
}
const nlinks = await fetchLinks().finally(() => {
if (active) {
setTimeout(() => fetch(), pollIntervalMs);
}
});
maybeSet(nlinks);
};
```
This would allow an immediate network call followup after a local fetch, to remove unnecessary waiting time for network data.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.