4 ms·
I find the regret for not using Next.js to be interesting, because I don't think it would have been a particularly good fit anyway. I've built an relatively hi
by andrewingram 8y ago
I find the regret for not using Next.js to be interesting, because I don't think it would have been a particularly good fit anyway.
I've built an relatively high-traffic SSR'd React website from scratch, and I've done the prototype for the rebuild of the website at work (we're moving away from Gatsby). The reason I'm considering Next is precisely because what i'm building isn't a "web app" like Spectrum, but merely a website (with some e-commerce features).
The sweet spot for Next.js seems to be that you're trying to make something that resembles a traditional pre-React-era website in structure, but just happens to be built using React. Once you're building an app, it doesn't feel like the best tool for the job. You can obviously bend Next to your needs, but fighting the framework is the last thing you want to be doing in the first year of a startup's life.
They managed to get an exit, which is a great result. And obviously they've learned a lot in the process which is another great outcome. But I can't help but feel that having just one experienced engineer on the team would have made their road a lot less bumpy.
- tuesdayrain 8y agoOut of curiosity, what was your reason for moving away from Gatsby? I found it very pleasant to work with. I actually moved from Next to Gatsby for personal projects because it felt more intuitive for me, and I like the plugins that they offer.
- rozenmd 8y agoNot the OP, but Gatsby works well for sites that rarely change content. For e-commerce sites with >100 SKUs + variants, having to rebuild every single time you make a description update is pretty tedious, and Next.js seems to be the solution in that case.
- mpeg 8y agoIt's only tedious if the build is not automated, static site generators work pretty well with continuous delivery practices though.
- deltron3030 8y agoCan't you use "dynamic widgets" inside Gatsby with some router tweaks, or did I misinterpret this blog post regarding Gatsby as "app shell"? https://www.gatsbyjs.org/blog/2018-11-07-gatsby-for-apps/ https://www.gatsbyjs.org/blog/2018-11-07-gatsby-for-apps/
- andrewingram 8y agoYou can do whatever dynamic things you want with Gatsby after the page is loaded, including client-only route. The issue is that if you need anything "dynamic" (eg user-specific stuff in the header, or layout variations for A/B tests) in the initial render; you have a more difficult problem. For A/B tests you could generate all the variations during build and have whatever sits in front of the site be responsible for serving the right files, but this just feels like an admission that, yes, static sites have their limits. For user-specific stuff the only real solutions are to go back to having pages be server-generated, or go all in on technologies like Edge Side Includes.
- andrewingram 8y agoLots of small reasons that added up to a feeling that we were constantly fighting Gatsby. A proper answer probably deserves a blog post because I want to make sure what i'm saying is properly reasoned, Gatsby is a great project that doesn't deserved FUD. But I answered the same question on Twitter yesterday, so here's a short summary: https://mobile.twitter.com/andrewingram/status/1085544564738412544 https://mobile.twitter.com/andrewingram/status/1085544564738...