Live data from Hacker News

Look ma, no React: I recoded my portfolio site with vanilla everything

clairefro.dev

41–50 of 192 posts

Re: Look ma, no React: I recoded my portfolio site with vanilla everything

#41

Earlier quoted context omitted.

Why would you need JSX for a static website? If you need JS then it's not "static".

Obviously there's a spectrum. A static website just means the files are served statically from a folder, and routing is just the folder path. You can still serve JS files and have a static website. If you put an alert on a button, you're not suddenly a SPA

It's more than that: you can just call methods in ReactDOMServer to get a DOM tree. The tools to wrap this vary widely; you can use Gatsby (ehh) or NextJS (yeah!) to do it if you want a full-featured framework around all of it, you can use something like react-snap if you want something simple and less all-in, or you can just call them yourself and plop some files in a build directory.

Re: Look ma, no React: I recoded my portfolio site with vanilla everything

#42
post #19

Earlier quoted context omitted.

[flagged]

I'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.

My 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.

Re: Look ma, no React: I recoded my portfolio site with vanilla everything

#43

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.

I 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.

Re: Look ma, no React: I recoded my portfolio site with vanilla everything

#44
post #15

Earlier quoted context omitted.

"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.

Why would you need JSX for a static website? If you need JS then it's not "static".

You're missing OP's point. The website can be fully static (even without any JS) but you could still use JSX/React to generate it (during build time, not runtime).

If you've ever had to build a static website from scratch, with the same navigation, footer etc. on each page, and without using frames, then you'll appreciate the amount of work that a templating engine saves you (whether JS-based or else).

Re: Look ma, no React: I recoded my portfolio site with vanilla everything

#45
post #18

Earlier quoted context omitted.

"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 l…

My 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.

I 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.

Re: Look ma, no React: I recoded my portfolio site with vanilla everything

#46
I've tried learning Ember, React, and Vue and have tapped out pretty early. Now I'm learning how to build a site using only vanilla JS and doing everything from scratch unless I find a reason to switch it. I think I'm making decent progress.

I even wrote my own simple test framework that shoves the results on the bottom of a page. After adding a few features I decided to switch it to Jasmine.

One thing I'm noticing is how often you need npm which I find very annoying. How is a JS library or framework anything more than a single JS file that you have to include in your page? Why is everything npm this and yarn that? Jasmine has standalone install instructions that are easy to find but I can't say the same about Jest.

Re: Look ma, no React: I recoded my portfolio site with vanilla everything

#47
post #18
post #12

Earlier quoted context omitted.

Stop it. You know what they mean.

"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 l…

One’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.

Re: Look ma, no React: I recoded my portfolio site with vanilla everything

#48
post #22
post #4

The reason react was developed is mostly null at this point. Modern javascript is so fast and plesant it's hard to imagine many real reasons you can't stay entirely within vanilla.

That statement indicates you don't know why react was developed.

> That statement indicates you don't know why react was developed.

Why was it developed?

Re: Look ma, no React: I recoded my portfolio site with vanilla everything

#49
post #4

The reason react was developed is mostly null at this point. Modern javascript is so fast and plesant it's hard to imagine many real reasons you can't stay entirely within vanilla.

I find state management to be much easier with React. "All state is lost by default when any variable changes" is a fantastic starting point.

Re: Look ma, no React: I recoded my portfolio site with vanilla everything

#50
post #18

Earlier quoted context omitted.

"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 l…

One’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.

Agreed--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.
Post reply on HN