5 ms·
I was in a meeting a while back where a team that was tasked with standing up a few dozen completely static websites was discussing what React components to use
by geoffeg 3y ago
I was in a meeting a while back where a team that was tasked with standing up a few dozen completely static websites was discussing what React components to use. I asked why they were using any front-end JS framework at all and not just creating static html sites, maybe using a generator like Hugo or Eleventy if they wanted to templatize. The answer was that they didn't know how to create plain html sites without JS. That was moderately shocking to me. I offered to work with them to create the static html solution and they declined, saying they could be more productive with React.
- thex10 3y agoIt sadly no longer shocks me, I've seen many "front-end" engineers rely on React as a sort of crutch for building UIs. Even for non-interactive UI. :(
- onion2k 3y agothey declined, saying they could be more productive with React As much as it pains me to say so, they're probably right. If they don't know how to make a static site, and they're familiar with something like Next, then they probably can go faster and just let the framework take care of building the assets. I wish people still made static sites using boring tech but times have moved on, but honestly there isn't much difference in complexity between a NextJS static site and a Hugo or an 11ty static site.
- geoffeg 3y agoOh, I'm sure they're right, but it was wild to me, someone who starts any new web-based project with a static html page.
- ssijak 3y agoyou can make a static site with NextJS too Edit: And OP mentioned he suggested Hugo or some other solution which is miles behind tools in JS/TS world. Not to mention it is Python based and this team knew React
- satvikpendem 3y agoBecause I want to write JS(X) instead of having to suffer through learning yet another templating DSL. I don't understand why this si so hard for people to understand, templating languages suck.
- winphone1974 3y agoMaybe, but spaghetti jsx really sucks too.
- satvikpendem 3y agoSure, if you write everything in one file, but that's why componentization exists in React.
- mattwad 3y agoThis isn't an argument. Spaghetti templates are even worse
- Levitz 3y agoIf you are building static sites, all you are doing with reactjs is abstracting parts via components, right? All it takes is to actually write the html that goes into a component, rather than the component. I don't see how any react dev wouldn't be able to do this. Also, I, too, would rather use react. I'd rather be able to reuse components I already have or to make some to reuse later, and to keep the project organized in that way, plus future-proofing the project to a certain degree.