Next.js Discord

Discord Forum

is there a way to default to make all files as use client , and mark ssr pages as use server !

Answered
North Pacific hake posted this in #help-forum
Open in Discord
North Pacific hakeOP
why ? because i am having old project, and old UI library that is not really custom for nextjs , but still i have to use it , but i cant go throguh each file and mark it as use client ! also most of my pages are use client , while i have way less pages the are not server rendering compatible ?!
Answered by B33fb0n3
you can use the [pages router](https://nextjs.org/docs/pages). With the pages router all pages are by default client components and if you need server components you explicity mark them.

In the [app router](https://nextjs.org/docs/app) its the other way around (all server, mark client)
View full answer

3 Replies