Live data from Hacker News

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

clairefro.dev

91–100 of 192 posts

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

#92

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

We had an intern last year, and I got a chance to do a 1-on-1 with him later on on his time with us. He was looking for some insights from the engineer in the org with the longest career in tech.

The biggest single thing I think I ended up doing during that session was getting him to re-frame his thinking from "I'm a React developer" to "I'm a developer", emphasising how all the fundamentals remain the same, just the nitty gritty implementation changes a bit from time to time. It was interesting to watch that lightbulb moment happening with him as we were talking, while also frustrating that the bootcamp etc. training he'd been through had so fundamentally set his thinking up wrong from the outset (since had a few more interns that came via different bootcamps, and it has been the same story with each!)

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

#93
post #53

Earlier quoted context omitted.

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

Static doesn’t mean no JavaScript. Usually it means it’s not rendered on the server. Every time i start making a static website, i end up needing to include a table (or some other structured display of data) and then just switch to JSX to render the data with a loop. Sometimes i then render it as html and deploy, and sometimes i deploy it as react. But that’s how i usually end up using React even when static.

Indeed, static just means that the site files can be on a CDN and not need to change. Technically, SPAs are also static, if they spit out pure HTML, CSS and JS files that you can put on a CDN.

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

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

It's also been possible for 30 years to do the same with languages like PHP, ColdFusion, etc, no build steps necessary, and HTML is your "templating language".

Sure, I like TypeScript and componentization though which JSX can give me where PHP doesn't. Most templating languages are dynamically typed.

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

#95

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

And that's why learning is best left as an individual pursuit. For me, it is always best to start with a complex system and then work backwards, understanding the thoughts and decisions that went into each step along the way. When I start with the basics I don't get a feel for the bigger picture and it means nothing.

I'm glad I've only been around the industry for 25-some-odd years. We already had many high level abstractions to work with. If I were old like you and had to start with flipping toggle switches, I'm sure I would have zoned out immediately and never progressed further.

I could handle flipping toggle switches now, but only because I've been engrossed in the bigger picture thanks to those high level abstractions.

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

#96

Earlier quoted context omitted.

You think they would have discovered Flask or something similar just out of personal curiosity.

I think a culture has been created where anything resembling server-side rendering (other than Node spitting out JSON) is legacy to be avoided ..... until of course the Javascript creates its own convoluted version of server-side rendering, which is revolutionary and the new hotness.

The main benefit to JS being used as a server side rendered and client side rendered language is that you have a lot more control over which parts you want on the server vs the client, and you can introduce hydration where needed. You technically could do that in PHP and other non JS languages but that's annoying because you'll be mixing multiple languages together and it would be more clunky. So yes, there is some "revolutionary" benefit to having everything in JS/TypeScript.

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

#97
post #23

My website is also completely static, but made with React. That means no React at all at runtime, it is completely static. React does not automatically mean dynamic. I get all the benefits of both. I love the flexibility nextjs provides here.

NextJS really does feel like a featherweight React in all the best ways

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

#98
post #89
post #76

Earlier quoted context omitted.

Seems like just lack of experience. You can even do it simply with JS with onHoverIn / onHoverOut

There is no onHoverIn or onHoverOut in JS.

yeah sorry that’s the react-native equivalent. you could use mouseenter / mouseleave events

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

#99
post #76

Earlier quoted context omitted.

Seems like just lack of experience. You can even do it simply with JS with onHoverIn / onHoverOut

While that's possible, it's a lot more fault tolerant to use the declarative :hover rule, than it is to handle it procedurally. The browser knows how to handle odd pointing devices, touch states and won't ever have to deal with uncaught errors in a mouseover/mouseout event.

for sure, was just an example that there are apis, that could have been reached for even without CSS knowledge that would make it easier than trying to get the position of the mouse on the screen, the position of the target element and if they overlap

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

#100
post #70
post #13

Jumping on the React hate train has become a trend these days, but it still has its place.

Of course it has its place. Not for a blog though, it makes no sense

You can achieve very good results with Next, by using SSG, SSR and ISR. That implies being very comfortable with React. Otherwise there’s tons of solutions for a blog scrnario.
Post reply on HN