DEV Community

Discussion on: Gatsby vs Next.JS - What, Why and When?

Collapse
adeyemiadekore2 profile image
korey 🇳🇬 • Edited on

Tried out Gatsby recently, it's really awesome, hoping to go into next.js soon.

From the authors explanation that next.js involves generation of content from the server. In terms of performance making round trips to such server and getting our content would have to affect the speed of such application. I think that was why client side rendering (CSR) was introduced in the first instance.

Well unless we introduce some caching, but still our app would still be slower initially.

I guess we have some pros and cons.

Collapse
douglaslondrina profile image
Douglas Schmidt

Not necessarily. Rendering on the server-side has the benefit of less back and forth between the client and server as requests have to be made to bring content, so it could actually be potentially faster.

And as you mentioned, server-side rendering makes caching and working with CDNs a lot easier.