Whenever we want to build a
static website that is super fast, super SEO friendly, and is able to deliver
great user experience we choose one of the two famous react frameworks which is Next.js
and Gatsby.js, and today we're going to talk a bit more about the differences
between them and when to use which one. One of the main differences between Next.js and
Gatsby is that Next.js was initially a server-side rendering tool. In other words, it only supports
Static Site Generation (SSG) since 9.3 version. On the other hand, Gatsby was always meant to
be a static site generator, so there is like a lot of out-of-the-box solutions, Gatsby Themes,
a quite rich plug-in ecosystem and so on. Another, yet a bit smaller, difference is the way
they handle data. In Gatsby data fetching is going through GraphQL by default. On the
other hand Next.js is a bit more flexible, and you can pretty much decide how
you're going to approach data fetching yourself. No matter what, both Gatsby and Next.js
are really great tools to build static pages and the decision about which one to choose
is really a matter of project requirements. One of the most important things we have to
consider while choosing between Gatsby and Next.js is how many updates your website will have
during the day. As we said before next.js was initially a server-side rendering tool and all
the updates are happening pretty much dynamically. While with Gatsby, each and every update means
that you have to build your website again and again. In general it's easier and faster to build
a website with Gatsby because it comes with many plugins and ready to use solutions, so if you want
to build simple website that doesn't require too many updates daily I would definitely suggest
going for Gatsby. Those websites could be like: a website for your company, landing page for your
product, your personal blog. On the other hand Next.js is a really great tool to build truly
outstanding and customized user experience, and it's really useful when it comes to big e-commerce
stores, when you have a lot of daily updates on your website, when you want to build a really
big web portal, where you have a lot of users. Nex.js is a really great idea when your project
demands server-side rendering more than static site generation. On top of that you don't have to
worry about SEO because both Gatsby and Next.js are well ranked by google. So, this is it for
today, I hope you got some useful information. If not let me know in the comments. Just mind
that i didn't pick up all the differences between Gatsby and next, and I just focused on the ones
that we have to face frequently with our clients, so thanks very much for watching
and see you in the next movie.