Serious question: Why generate a static site at all instead of running next.js behind a CDN? Now a publish is really just a publish instead of a rebuild.
It's a fair question that everyone should ask themselves in our shoes. If we did it again maybe we'd rethink. That said, the entire goal was to allow a non-engineer to more easily enable our end-users with documentation. We didn't anticipate the amount of engineering hours it'd take to actually get this functioning well given its adoption and ecosystem. Even the investment into MDX though was to service the core goal…
An Honest Review of Gatsby
101–110 of 120 posts
Re: An Honest Review of Gatsby
#102Earlier quoted context omitted.
Yeah, SSG build times are certainly an issue in my experience, even for smallish sites. I quite like the incremental regeneration idea in NextJS: https://nextjs.org/blog/next-9-5#stable-incremental-static-r... - sounds like it will rerender pages in the background as traffic comes in to them, while serving a stale version to the original request. I guess there are times when this might not be acceptable though... in…
It’s kinda funny to see that go around in circles. “Pre-rendering content as requests come in” is exactly the same as having dynamic pages and a layer of caching, as had been standard practice for the last 20 years. Some people just really like to “solve” already solved problems.
Re: An Honest Review of Gatsby
#103I wonder why it seems nobody wants to use Hugo. Smashing Magazine appears to be happy with it and they tooted about their experience with Hugo multiple times. Instead, everyone chooses Gatsby, Next or another javascript based framework of this week.
Once you figure out how to really effectivity use it you can be productive and build out some huge websites and it's fast as hell.
Re: An Honest Review of Gatsby
#104This review nails it. It takes the matrix.org gatsby website 20 minutes to build currently, which is excruciating when trying to do quick fixes for blog content - you just sit there wondering what the graphql is actually doing and what it’s giving you :/ edit: https://github.com/matrix-org/matrix.org/ if any indignant gatsby fans want to tell us what we’re doing wrong
Yeah, SSG build times are certainly an issue in my experience, even for smallish sites. I quite like the incremental regeneration idea in NextJS: https://nextjs.org/blog/next-9-5#stable-incremental-static-r... - sounds like it will rerender pages in the background as traffic comes in to them, while serving a stale version to the original request. I guess there are times when this might not be acceptable though... in…
Re: An Honest Review of Gatsby
#105Advice on the "A Broken DOM" section: it sounds exactly like a hydration mismatch. Hydration is the process of React correlating existing DOM nodes from server-rendered HTML (SSR) with the initial render of the React app on the browser-side. (As opposed to what happens without SSR, which is almost always the app being rendered into an empty DOM node – no content exists yet.) Satisfying hydration constraints is by far…
Re: An Honest Review of Gatsby
#106Advice on the "A Broken DOM" section: it sounds exactly like a hydration mismatch. Hydration is the process of React correlating existing DOM nodes from server-rendered HTML (SSR) with the initial render of the React app on the browser-side. (As opposed to what happens without SSR, which is almost always the app being rendered into an empty DOM node – no content exists yet.) Satisfying hydration constraints is by far…
Seems insane that these kind of quirky bugs are an issue in a modern system. Why isn’t there some kind of checksum to catch them immediately?
React could do better in both dev and prod though, IMO. It doesn't tell you where/which component had the issue, just the type of DOM node with a mismatch.
Re: An Honest Review of Gatsby
#107It's amazing to me that there's still not a super simple create react app option out there that builds a react app based on markdown sources for pages. You can get close to it with gatsby et al., but they're all twiddly or fragile in their own ways.
Re: An Honest Review of Gatsby
#108I migrated a couple of sites I look after from react-static (which is a nice, simple library but unfortunately had some fundamental issues that it sounded like we’re unlikely to be solved and gave the impression that it was struggling for maintainers e.g. https://github.com/react-static/react-static/issues/1203 ), one to Gatsby and the other to NextJS. I agree largely with the findings described here - Gatsby felt qu…
I use createPages and I get hot reloading when running gatsby develop. I also just figured out how to trigger hot reloading for sources that normally don’t trigger it (markdown files which I was manually processing). Basically, I discovered that gatsby will hot-reload when it sees a change in code files (.tsx). So I created an essentially empty _rebuild-trigger.tsx file and imported that in my main page template. Now…
Re: An Honest Review of Gatsby
#109Earlier quoted context omitted.
For those who want to like Hugo, but can't stand the templating language: there's also Zola ( https://github.com/getzola/zola ), a superb static site generator, with built-in Sass compilation, written in Rust.
There is a shit tonne of static site generators that ain't hugo though.
Re: An Honest Review of Gatsby
#110Earlier quoted context omitted.
> If a static site generator put my images in the wrong place and required a gigantic JSON file to be loaded by the client for no reason I would not think twice to get rid of it. Incorrect DOM-output is likely caused by common mistakes (e.g. conditional rendering based on `typeof window !== 'undefined'`) which screw up rehydration. Dealt with it in the past and seen a lot of developers struggle with it. This article…
You're extremely limited in what you can compile as a GraphQL query, so while yes I agree with you that likely there is some stuff we're simply doing wrong.. good luck doing it right. After all, its a database query language trying to create a giant cache of its results. For example, we have what roughly amounts to an component. It uses some contextual information to include language-specific code. That include compo…
The basic idea is your page context just contains identifiers for the content you need to display on the page and then the page query uses those identifiers to query for just those objects and request all the properties of those objects that the page needs.