Async components
Unanswered
Cuban Crocodile posted this in #help-forum
Cuban CrocodileOP
Does async server components components always need to be wrapped in suspense? I want to fetch some data and I don't know if I always have to fetch it from the page.tsx level and pass it as props when I don't want to use <Suspense>
1 Reply
@Cuban Crocodile Does async server components components always need to be wrapped in suspense? I want to fetch some data and I don't know if I always have to fetch it from the page.tsx level and pass it as props when I don't want to use <Suspense>
no, we don't.
by using suspense, we could show loading ui until the fetch request finished and you could use
https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming
by using suspense, we could show loading ui until the fetch request finished and you could use
loading.tsx which will wrap the page with <Suspense /> for youhttps://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming