Next.js Discord

Discord Forum

How to avoid content layout shift but still have a loading.tsx

Unanswered
Nile Crocodile posted this in #help-forum
Open in Discord
Nile CrocodileOP
I realized that the API calls to supabase were taking a decent chunk of time so I figured I would add a loading.tsx. However, with ShadCN ui, the Skeleteon and Table components seem to not really work well. I would have the <Skeleton /> pop up in the table and then just disappear but it was still loading. And then obviously it wasn't an exact match so I had a huge content layout shift. Any tips to avoid this?

0 Replies