react-loading-skeleton icon indicating copy to clipboard operation
react-loading-skeleton copied to clipboard

Why not use children and loading prop?

Open adi-works opened this issue 9 months ago β€’ 3 comments

The API of this component doesn't make much sense and induces a lot of boilerplate code. Why not use children like Radix does? see https://www.radix-ui.com/themes/docs/components/skeleton.

adi-works avatar Apr 25 '25 16:04 adi-works

Hi,

I created a pull request about this subject, maybe you could review.

#246

@dvtng

OFK0 avatar Aug 29 '25 06:08 OFK0

The API of this component doesn't make much sense and induces a lot of boilerplate code. Why not use children like Radix does? see https://www.radix-ui.com/themes/docs/components/skeleton.

I second this. Let alone the fact that the approach of doing prop.something || <Skeleton /> is not really feasible in the real world πŸ˜… views are much complex than that. The idea of "put the skeletons inline in your components" is a nightmare idea.

Unfortunately, the Skeleton component from Radix UI Themes is not available standalone and we'll have to port it manually including all the dependencies :(

juanpablob avatar Sep 24 '25 19:09 juanpablob

Hey everyone πŸ‘‹

I came across this issue while working on improving skeleton loading in React apps. I actually built a package called React Skeletonify that solves this problem in a dynamic way.

Instead of manually defining skeletons or repeating markup, it automatically generates adaptive skeletons based on your component structure β€” with full control for excluding tags, customizing animation, and managing global or local configs.

If you’re looking for a more flexible solution, you can check it out here: πŸ”— Docs: https://react-skeletonify.sinan-dev.in/ πŸ”— npm: https://www.npmjs.com/package/react-skeletonify

Would love your feedback or ideas for improvement! 😊

Sinan0333 avatar Oct 13 '25 06:10 Sinan0333