use a skeleton when rendering a component
was wondering if i could add a skeleton for my navbar client component that is in my layout.tsx
not sure how to do this
2 Replies
wait
client component
whatever data fetching library you are using should give you an is loading state
just conditonally render the skeleton based of isLoading
ok so
i have a navbar. it has 2 buttons. but they take like 1 second to load
on my root layout.tsx which is a server component, I want to have a loading animation when rendering the navbar.
the navbar is a client component and i dont fetch any sort of data its just clerk components with css