5 ms·
Even a static site needs to be generated somehow, and React is quite a nice way to generate HTML. It can even do that on the server, and disabling JS in dev to
by andrewaylett 7y ago
Even a static site needs to be generated somehow, and React is quite a nice way to generate HTML. It can even do that on the server, and disabling JS in dev tools shows that's what they do :).
- smt88 7y ago> Even a static site needs to be generated somehow No, it doesn't. You can just write it. Anyway, the question here is not why they're using React to generate a site, but rather why they're using it to display the site. As others have mentioned, there are lots of tools to write DRY HTML/CSS, then compile, then deploy as a static site. No one would ever know which tool you used. The weird thing here is that they're using React in the browser (not as a one-time step) for a completely static site.
- robertoandred 7y agoWhy not? There's no real downside when combined with SSR.
- paulryanrogers 7y agoComplexity is costly and generally more brittle
- beatgammit 7y agoI love using Markdown for documentation. It's readable in source, it's easy to compile to HTML, and it's pretty easy to add some JavaScript later for dynamic parts.
- andrewaylett 7y agoEven "just writing it" is a generation step.