Data Sources: give Source methods access to isLoading()
Open
- Dominant language
- JavaScript
- Stars
- 3.4k
- Forks
- 312
- PR merge metrics
- No merged PRs in 30d
Description
One common pattern for Data Sources is to only fetch if a request is not already in progress. `shouldFetch` seems like an appropriate place for this logic, but it doesn't have access to `isLoading`.
If it did, the behavior could be implemented with
```
shouldFetch: (state, args) {
return !this.isLoading();
}
```
Contributor guide
Research direction
Start by tracing the Data Sources implementation around the shouldFetch callback and the existing isLoading method. Verify how Source methods receive state and arguments, then add coverage showing that shouldFetch can detect an in-progress request without breaking current behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100