5 Replies
by default every react components is a server component
React.FC is for the sake of typescript
yes, that's what I'm looking for
so that I accidentally don't return something that's not jsx
in a server component
Just using FC is enough
As long you don't need something that would happen only on client, like state or window related
It's fine to return in a server component
That's what I did originally, but I get this type error:
Type '() => Promise<void>' is not assignable to type 'FC<{}>'
It doesn't accept it if it return value is a promiseIt's fixed on the new typescript release
Next does accept
But typescript complains