Next.js Discord

Discord Forum

Data fetching dilema

Unanswered
Kawakawa posted this in #help-forum
Open in Discord
Avatar
KawakawaOP
Hi there, if I had a page that was a RSC that fetches some data, and then I'd have a client component that is an input box with a debounced submit function (not yet made) and a grid which just renders some cards to display the mapped out data - what would be the best way to fetch the new data, set it to a data variable - and also while the data is fetching show some skeleton loaders using Server Actions?

2 Replies

Avatar
KawakawaOP
- Bump
Avatar
Belgian Hare
show skeleton loaders by default and stop it ( set its state false ) after the data fetching is done ( *then method ).