4 ms·
Isn't using React with a static site generator framework basically the same thing but better?
by spoonfeeder006 2y ago
Isn't using React with a static site generator framework basically the same thing but better?
- datavirtue 2y agoYes, if you want to throw up in your mouth.
- deleted 2y ago[deleted]
- realusername 2y agoIn theory yes, in practice good luck maintaining that if you are just a solo blogger. I doubt your blog would last a single month without some breaking change of some sort in one of the packages.
- spoonfeeder006 2y agoyou mean npm packages? why would you need to update those anyhow?
- realusername 2y agoBecause at some point it will cease to work? It needs upgrades like any other project. Every upgrade in the JS world is very painful.
- spoonfeeder006 2y agoWhy will they stop working eventually? Assuming they are all self contained and you don't upgrade even node js for that project Edit: Oh right, OS upgrades could do it. Or network keys changing etc...
- spoonfeeder006 2y agoYeah I guess React + SSG isn't the best choice. Nano JSX might be better https://nanojsx.io/ https://nanojsx.io/
- lmm 2y agoYes, it is. Unfortunately HN has a crazy bias against JavaScript (the least crazy part of the web stack) and in favour of HTML and CSS, even though the latter are worse in every meaningful way.
- oneeyedpigeon 2y agoI don't even know where to begin with the pretence that you can compare HTML with JS and somehow conclude that one is 'better' than the other. They are totally different things. JS is for functionality, and if you're using it to serve static content, you're not using it as designed.
- lmm 2y agoI don't particularly care about "designed for". If you've got to serve something to make the browser display the static content you want it to, the least unpleasant way to do so is with JS.
- TeMPOraL 2y agoLeast unpleasant to the developer. Most unpleasant to the user. It breaks all kinds of useful browser features (which frontend devs then recreate from scratch in JS, poorly; that's probably the most widespread variant of Greenspun's tenth rule in practice).
- lmm 2y ago> It breaks all kinds of useful browser features (which frontend devs then recreate from scratch in JS, poorly; that's probably the most widespread variant of Greenspun's tenth rule in practice). Nah, it's the opposite. JS tends to perform better and be more usable for the same level of feature complexity (people who want more complex sites, for good reasons or bad, tend to use JS, but if you compare like with like), HN just likes to use them as a stick to reinforce their prejudices. (E.g. if you actually test with a screenreader, aria labels work better than "semantic" HTML tags)
- mrweasel 2y agoThen you'd have to learn React, and for many of us the point is that we really don't want to learn React, or other frontend frameworks.
- culi 2y agoNot remotely! Unless you meant Preact. React ships an entire rendering engine to the front-end. Most sites that use React won't load anything if javascript isn't enabled
- deleted 2y ago[deleted]