Why not use children and loading prop?
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.
Hi,
I created a pull request about this subject, maybe you could review.
#246
@dvtng
The API of this component doesn't make much sense and induces a lot of boilerplate code. Why not use
childrenlike 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 :(
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! π