question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Skeleton.Button loading prop does not work

See original GitHub issue
  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Import Skeleton and use any Skeleton component (Avatar, Button, Input etc.) add prop loading={false} to it

<Skeleton.Avatar loading={false} />

What is expected?

Skeleton should not load

What is actually happening?

Skeleton is loading

Environment Info
antd 4.3.4
React 16.13.1
System MacOS
Browser Chrome 83, FF 77

This bug only exists for other Skeleton components. It works for normal Skeleton

<Skeleton loading={false} />

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
hi-rustincommented, Jun 17, 2020

I don’t think we need this props, if we add this props the api look like:

<Skeleton.Button><Button></Button></Skeleton.Button>

It’s wired.

You can use Skeleton.Button like:

loading?<Skeleton.Button/>:<Button/>

This is my opinion, what do you think?

0reactions
hi-rustincommented, Aug 25, 2020

I still think it is weird. @afc163 @zombieJ @fireairforce What do you think?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding skeleton effect to form fields until props data is loaded
I'm passing JSON data pulled off a REST API via props to the component below. Since I don't pre-set a value to the...
Read more >
react-loading-skeleton
Make beautiful, animated loading skeletons that automatically adapt to your app.. Latest version: 3.1.0, last published: 8 months ago.
Read more >
Skeleton
When a resource needs long time to load. When the component contains lots of information, such as List or Card. Only works when...
Read more >
Implementing Skeleton Screens In React
A skeleton screen is a version of the UI that doesn't contain actual ... using React Loading Skeleton, to show how a skeleton...
Read more >
Material UI in React #9 - Loading Skeleton - YouTube
Hello fellow react devs! I am happy to share part number nine of the series. In today's episode you will learn how to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found