Why don't we have a LoadingComponent to show loading view?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.2k
- Forks
- 393
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 1
Description
Problem Statement
Loading a list can take a while to get the data, usualy we would show some loading view like a skeleton view, but right now the only ways I see to do so are the following:
- use ListEmptyComponent with loading state, which is not ideal and leads to many bugs.
- use renderItem which is even more awkward and complicated to manage
- conditionally render either the FlashList or the Loading view, which is not bad, but also leads to visual glitches and bugs
Proposed Solution
Introduce a new property LoadingComponent that gets renderd based on a given isLoading property
Example Usage
<FlashList
data={displayData}
isLoading={isFetchingData}
LoadingComponent={<SomeLoadingSkeleton/>}
/>
Priority
- Critical - Blocking my project
- High - Significant improvement to my workflow
- Medium - Would be nice to have
- Low - Minor enhancement
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing FlashList's existing ListEmptyComponent and renderItem handling, then inspect how component properties and loading state would fit the current rendering flow. The change is complete when a new LoadingComponent can be shown according to isLoading without requiring conditional FlashList rendering or repurposing the empty state, with the example usage working as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100