[Skeleton] Add loading property
Open
Nobody has claimed this yet.
scope: skeleton
type: new feature
waiting for 👍
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Summary 💡
Add the loading property to simplify the loading branch of the data acquisition.
Examples 🌈
Use cases are expected to include
<Skeleton loading={loading}>
<Children />
</Skeleton>
Motivation 🔦
I would like to achieve the following simplification of branching.
current
{loading ? (
<Skeleton variant="circular">
<Avatar />
</Skeleton>
) : (
<Avatar src={data.avatar} />
)}
After the realization of this ISSUE
<Skeleton loading={loading} variant="circular">
<Avatar src={data.avatar} />
</Skeleton>
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 locating the Skeleton component entry point and read how it currently renders its children and variants. Add the loading behavior described in the examples so consumers can wrap content with Skeleton loading={loading}; done means the loading branch is handled by Skeleton while the loaded child renders normally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100