Gatsby and Next.js, from a first glance, could look pretty much the same. Both are React-based frameworks, do SSR, SSG, have big communities. We ac...
For further actions, you may consider blocking this person and/or reporting abuse
I’ve recently began building a blog using NextJS and Sanity as the CMS. Coming from original WordPress and some basic PHP/Twig sites, it’s quite a change but I’m really enjoying the workflow.
It seems a good CMS like Sanity can take care of several issues you brought up such as image optimization, easy CMS integration, and previewing content.
I was considering using WP as an initial proof of concept but opted to just use Sanity and deploy it all in Vercel.
It's far beyond me why someone would use such a framework.
You are building STATIC pages with React. Think about it. Static. React.
And then you serve all your content as html. And then you serve it again as JSON to hydrate the page. High performant you say? Look at the TTI and the cpu load when all that javascript and JSON data comes and needs to be parsed and evaluated.
I have to deal with this gatsby crap on daily basis. Slow build times. Fucked up HMR.
Do you know that in dev mode Gatsby serves all the CSS that it finds in the project so you have to think how to scope everything so you can develop normally?
Don't do this to yourself. This abomination needs to die.
Astro should be the best of both worlds, but I haven't tried it yet: write your pages with React to get the easy componentization of everything, ship pure HTML/CSS with JS only where it's needed for interactivity.
i personally like next.js and vite-plugin-ssr.
It is not possible to have Auth capabilities on Gatsby?
It’s possible, but experience will be less pleasant. Next.js has much more tutorials and examples related to this topic and also there is a very nice next-auth library that does a great job.
But afaik you can't use ssg with next-Auth. That's why decided against it
Yes, you can!
Even with custom Auth pages?
Based on my projects, most of the time, Auth are handle in headless API.
Nextjs is way much faster than gatsby. All those plugins for gatsby not maintaining well. I will learn SDK better instead of wasting time with gatsby plugins.
Gatsby does a lot of things by default for you. That can be a pro for a newbie or an intermediate developer. Plugins only increase the curiosity. But for some people that's exactly the problem. When they can't control the complex behavior of something people seem to get annoyed and would like to write their own solutions. It's exactly just like a debate between using a frontend library or to write one's own css instead.
Having the flexibility of complex control sure does bring in the heat of doing everything by your own hands.
Now Gatsby is good, definitely good. Maybe on par with nextjs. But the real power of nextjs is the "barebones-ness" relative to gatsby and you'll see some very professional and expert developers advocating for that.
It was a nice read though. You really did a great job explaining the differences ^^
You can also use gatsby "barebone" and write everything custom if you like, plugins are just an option to not reinvent the wheel not an obligation.
IMO it's really nice to have the option to use these plugins
Next.js gets my vote its more popular than Gatsby now with a bigger more active community. The speed is also better in my opinion.
According to my projects, headless APIs are typically used to manage authentication. you can try this out to know why every student should read the great gatsby. The essay is a remarkable story that appeals to students for a variety of reasons. It is really relatable to both adults and children. You may see a little part of yourself in each character when you examine them.
For simple static sites, Hugo rocks!
Nice article, I think you've hit all the major points on the head!