Next.js Discord

Discord Forum

Nextjs 13 Login page

Unanswered
Common carp posted this in #help-forum
Open in Discord
Common carpOP
Hello, I have recently dived in next 13 and at the moment I am creating a login page. My question is -

Is it ok to have the page as client component. I mean, I know it is ok but should I go out of my way to develop it without state and so on to have it as server component ?

4 Replies

Yes, it is okay to have the login page as a client component. In fact, this is the default behavior for login pages in Next.js. This is because the login page typically requires user input, which is handled by hooks and DOM events.
Morelet’s Crocodile
n
Orinoco Crocodile
You can use server actions however.