Next.js Discord

Discord Forum

What is type of Server Component?

Answered
indicozy posted this in #help-forum
Open in Discord
Hi there!
What is the type of server component which is async function? Is it just Promise<JSX.Element>?
Answered by joulev
the return type is Promise<JSX.Element> yes
View full answer

4 Replies

Answer
@joulev the return type is `Promise<JSX.Element>` yes
Thanks! Is there any variable/type in next's library that I can retrieve it from or should I just create my own?
just create your own
@joulev just create your own
gotcha, thx again!