7 ms·
Yes you don’t need React for a static site. Is this news at this point? Also I find the colour scheme hard to read but maybe it’s just me.
by zeroonetwothree 3y ago
Yes you don’t need React for a static site. Is this news at this point?
Also I find the colour scheme hard to read but maybe it’s just me.
- camillomiller 3y ago[flagged]
- willio58 3y agoReact isn’t complicated. It’s not even considered a framework, it’s better described as a library! It’s a great way to templatize your code. Is it the only way? No. Do you even need to templatize your code? No.
- quest88 3y agoStop it. You know what they mean.
- eropple 3y ago"What they mean" isn't correct or reasonable and is largely part of the same grumbling groupthink that willfully refuses to come to grips with the realities of the tools they've decided they don't like. React is not large, is of moderate complexity (most of the complexity of "a React app" lives well outside of React itself), and can be stripped down to a fully static templating language without much effort. As I've linked elsewhere, I turned React into an email templating engine once because I don't like Handlebars; rendering JSX as static, no-JS HTML is a one-liner when you throw it a React component. Using React for a static website is totally fine. So is not using it. Being weird about it is not fine.
- yitianjian 3y agoMy hot take: there's a general feeling of looking down on "web devs" or UI/front-end stuff. It's not really necessary to have React for a portfolio site, but it's not really an issue if they do.
- eropple 3y agoI wouldn't consider myself a frontend developer--I've run infra teams, built backends, built desktop applications, all that too--and I'd definitely agree with that. There's a lot of strange smugfacing about using fit-for-purpose tools that translates into the shitting on people by the old-at-heart and the underinformed. Like, stepping away from JavaScript for a second, you still see people getting mad about C++ on HN and defending the use of C outside of a micro because "just be a good programmer" even though maybe a few dozen such good programmers have ever existed. It's very weird and it's one of the things about this profession that bothers me a lot. I am fortunate that I have reached a place in my career where I can simply refuse to have that sort of person on my team.
- seattle_spring 3y agoBeautifully said. Ironically (or maybe not), the worst engineers I've worked with in the last 15 years are strictly backend engineers who vocalize how frontend is easy / isn't real software engineering / etc.
- camillomiller 3y agoOne’s free to code their portfolio in COBOL if they find a way to do it. It’s the underlying narrative of the “oh look, there are things called HTML + CSS + JS that work so well and they’re even faster” behind this kind of posts that tbh makes them quite insufferable.
- eropple 3y agoAgreed--it ignores that JSX, even baked statically, was a pretty nontrivial life improvement for front-end development because you got to get away from text manipulation as a first-class citizen.
- willio58 3y agoI guess I don’t? Are you referring to the framework comment? Next.js is a great example of a react _framework_. It’s opinionated, it provides tools to make a fully-fledged website. If you just drop react into a site with a script tag, you get what react offers. You get a way to manipulate a virtual dom and render components. Instead of saying “you understand what they mean”, please give an example of how I mis-stepped. I don’t want to come off as antagonistic for no reason.
- tremon 3y agoThis happens rare enough that a news event may be warranted though.
- karpour 3y agoI'm baffled by how how many web developers have the attitude of "React projects are too complex, let's put another layer of abstraction on top of React to simplify things". Of course, usually for things that should never have been React to begin with. Anyway, good for that guy that he discovered Vanilla HTML and CSS late in his career, but I also don't see how this is front page worthy.
- camillomiller 3y agoMy comment even got downvoted. There’s certainly some React diehards around I guess who really don’t want to hear that their overconvoluted approach could be simpler and leaner 95% of the time.
- cmrdporcupine 3y agoYour comment is likely downvoted because of tone, not the sentiment.
- camillomiller 3y agoEver heard of “being ironic”? I will never fully understand such a devoted stance on policing tone. Especially when the comment is not even half as harsh as half of the other comments that pile on, even calling this post unworthy of the home page.
- arrowsmith 3y agoher craft
- SkyPuncher 3y agoI use React for static sites and really enjoy it. * as it’s simplest, it’s a really easy to use templating tool. * there are a tools that compile to mostly static HTML, so not performance hits * theres almost always something that pushes you to want some JS. React is handy to have. It also opens the door to all of the the community packages. No sense to re-invent the wheel.
- TX81Z 3y agoCurious what you mean by “almost always something” that makes you use JS? What besides shitty/illegal tracking code and cookies do you need to include? Honest question.
- SkyPuncher 3y agoIn my case, we wanted to gather feedback on a product we were launching. Because we wanted to move fast, we’re in a regulated industry, and our initial tests were simple, we decided to built a simple “chatbot” style feedback tool. More generally, forms. Forms always seems to morph into more than just simple inputs.
- TX81Z 3y agoThanks for the reply, forms are such a pain in the ass. Of course you need hard input sanitizing on the backend but just helping people fill out a form correctly can require some JS.
- arrowsmith 3y ago> Is this news at this point? If you started your career in the last 5-10 years then yes, it might be news. An entire generation of web developers has been trained to think that every app big and small needs to be a convoluted SPA. The results are a disaster.
- eropple 3y ago"A convoluted SPA" is fully orthogonal to React. If you're making a blog into a SPA, that's a you problem. It's been possible (and recommended for many things!) to just bake a static website with React and use JSX as a templating language for a long time.
- arrowsmith 3y agoWhy would you need JSX for a static website? If you need JS then it's not "static".
- nesarkvechnep 3y agoBecause they only know JS and it’s ecosystem.
- ylyn 3y agoYou can render JSX at build-time. So it's just a templating language, as the parent comment said.
- eropple 3y agoReact is completely happy to spit out a DOM tree as HTML for you; wiring up the in-browser JavaScript side of React is optional. This is how static site generators like Gatsby or NextJS work (with some hacks that as a user you don't really care about) and (eliding some detail) how React Server Components now work generally. I've also used it to generate email templates[1] with some success, too. I use JSX because it's a nicer templating system than EJS or similar. It allows me to write components to encapsulate reused fragments rather than text manipulation. And I like it, which counts for something. Candidly, this is something that people who fulminate about React probably should know before they start talking. [1] - https://github.com/eropple/rx-mailer https://github.com/eropple/rx-mailer
- foobarbecue 3y agoI like the colors. It's readable for me and it reminds me of sherbert. edit: hm, she says it's a yaki imo / satsuma imo color theme. I love yaki imo.
- BiteCode_dev 3y agoYou don't understand, it's the future ! https://www.bitecode.dev/p/hype-cycles https://www.bitecode.dev/p/hype-cycles
- uxcolumbo 3y agoIt's not just you. The site has poor contrast ratio - fails all accessibility guidelines for text contrast ratio requirements.
- creata 3y agoReally? Firefox says the contrast ratios meet WCAG AA. For me, the main problem is the font weight. I'm sure it looks better on high-density displays, but it is way too thin to read comfortably at a regular pixel density.
- uxcolumbo 3y agoWhich extension are you using? I use a tool called CCA and it takes font size into consideration.