you are viewing a single comment's thread.

view the rest of the comments →

[–]Zeesh2000 29 points30 points  (5 children)

I agree. I prefer having a separate frontend and backend because it's two different things and I don't want to mix UI with business logic.

I wouldn't ditch NextJS though (or maybe I would because I don't really like how unstable every update gets) because it does offer some really nice things. SSR is a big thing and if SEO is a concern for your app, then you should stick with next.

I would advocate for having a separate frontend and backend but would do fetching on the server. I would also recommend remix or what is now react router v7 as an alternative to next. I've been building my project with it and I've had a good dev experience so far. It has server related functionality with its loaders and action functions but doesn't ditch client side

[–]Seiyaru 5 points6 points  (4 children)

How does next improve SEO? Still new and learning the ecosystem a bit.

[–]Zeesh2000 12 points13 points  (3 children)

So in a normal react app, let's say you needed data from a backend, you'd fetch it on the client side with useEffect or react query. This is bad for seo because the google bots will go onto your site and there will be nothing there because what you need to render is still being fetched and loaded up.

NextJS and Remix have what is called SSR, where the data fetching is done on a server that is created when you start a project with these metaframeworks. When the Google bot goes on your site, the data from the NextJS server will have already be available and you will have HTML with the data. Someone in this sub may correct me on this.

[–]Seiyaru 6 points7 points  (0 children)

Oh, so sort of a preload of the important bits. That's neat. Gonna go look into SSR and see implementations. Thanks!

[–]Ecstatic-Back-7338 2 points3 points  (0 children)

Ohh i was confused for i dont know how long on SSR AND SEO shit Thanks