goatslacker / goatslacker/alt

Data Sources: use id/key for isLoading

Open
#482 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.4k
Forks
312
PR merge metrics
No merged PRs in 30d

Description

Ideally, a Source could supply a key/id for the `remote` fetch to allow more granular loading tracking.

For example, a `PostsSource` could differentiate between fetching post X vs post Y instead of simply _any_ Posts-related fetch is in progress.

This way, the source could use a key of `'post-id-x'` or serialize the params for a key like `'{"user":"x","count":10}'`.

`isLoading()` could retain the same behavior, but gain `isLoading(key)` for checking a specific key.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.