Should page files always be server side component or can be client side?
Unanswered
Yellow-headed Blackbird posted this in #help-forum
Yellow-headed BlackbirdOP
I am currently building a web app and I got an error saying that I cannot use await on params because the function isn't async. But then on making the default export function async, I get an error saying that client components do not support async which then makes me believe that I should convert this to a server component. Anyway long story short - do page files need to be server components only?
2 Replies
Asian black bear
They don't need to be but it's an antipattern if they are not server components.
Doing so you're opting out of pretty much all app router and RSC features.