Back

App router or Pages router in Next js with appwrite ?

  • 1
  • Web
Lucky Klyist
7 Nov, 2023, 08:42

I'm curious which router from Next.js is recommended by someone at Appwrite for use with Next.js. Should I use the App Router or the Pages Router?

This is because when you use the App Router, you need to work on both the client and server sides. Also, it seems a bit tricky to set up server-side rendering with Appwrite. And when using the client, I need to turn every single component into a client component, which seems to make the App Router messy, I think.

TL;DR
The user is asking for advice on which router to use in Next.js with Appwrite. They mention that using the App Router requires working on both the client and server sides, and setting up server-side rendering is tricky. They also mention that using the client requires converting every component into a client component, which can make the App Router messy. The user wants to know if there is a recommended router to use. There is no solution provided in the thread.
otik
7 Nov, 2023, 18:03

It is always easier to use client-rendering, even better for rendering loading. (It is only my personal opinion). But if you want to use ssr, you can use appwrite-ssr npm pck

otik
7 Nov, 2023, 18:07

Maybe you can switch the ssr off, cant you?

D5
7 Nov, 2023, 20:18

If you don't need seo, then disabling SSR could probably be a good choice

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more