Live data from Hacker News

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

clairefro.dev

21–30 of 192 posts

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

#21
post #15

Earlier quoted context omitted.

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

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

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

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

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

#27
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 can render JSX at build-time. So it's just a templating language, as the parent comment said.

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

#28

> I became a dev when everyone was hiring for React, so React is what I taught myself immediately after bootcamp in the scramble for a job A better education path (in a bootcamp, university, book, youtube, whatever) would start with the fundamentals and build it from the ground up... not the other way around. (I just realized how lucky I am for being taught in the best possible order, from the ground up... first the…

Agreed, but it's so rare nowadays though. I still remember when I saw a junior frontend dev struggling to get some element to look differently when hovered in React. They went though loops and hoops to style it using CSS-in-JS and mousemove, only because they didn't hear about :hover.

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

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

React 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

Post reply on HN