News for hackers. Stuff that matters.
Re:No One Ever Got Fired for Choosing React by Jakobeha on Friday December 04, 2020 @11:06PM (#25311645)
The developer's project was exactly the type of project which should use React: a "web app", an application which is on a webpage.

A problem with React (or any big library really) is that sometimes developers use it for blogs, forms, or other simple websites. There are many great tools out there for these websites, React is not one of them.

Re:No One Ever Got Fired for Choosing React by whywhywhywhy on Saturday December 05, 2020 @11:36AM (#25315783)
> developers use it for blogs, forms, or other simple websites.

Starting to see this on my team, example would be a simple marketing landing page, then for what are perfectly normal things you’d have on the page like a video player or a button they start using the components built for the web app.

Then you ask them for things to behave a little different or for some of the normal things you’d expect on a marketing page like a video auto playing silently with subtitles. Then you just start getting told “nah it’s too much work the component wasn’t built to do that”.

Re:No One Ever Got Fired for Choosing React by jinnko on Saturday December 05, 2020 @05:38AM (#25313442)
> sometimes developers use it for blogs, forms, or other simple websites. There are many great tools out there for these websites, React is not one of them.

Such as?

Re:No One Ever Got Fired for Choosing React by JackMorgan on Saturday December 05, 2020 @06:38AM (#25313774)
Here's a vote for Hugo, the static site generator written in Go. It's blazing fast.

I use it for my blog and love it.

Re:No One Ever Got Fired for Choosing React by bogwog on Saturday December 05, 2020 @09:17AM (#25314698)
> It's blazing fast.

This seems like an odd value proposition for a static site generator.

Even a really shitty, unoptimized single threaded non-incremental build system shouldn’t struggle too hard to compile a static site. And even if it does, if it has a good amount of features, it shouldn’t be a problem for most use-cases.

Re:No One Ever Got Fired for Choosing React by plorkyeran on Saturday December 05, 2020 @11:44AM (#25315847)
Using jekyll I've gotten 30+ minute build times for sites. SSGs aren't only useful for sites with a single-digit number of pages.
Re:No One Ever Got Fired for Choosing React by JackMorgan on Sunday December 06, 2020 @06:56AM (#25322954)
I switched from Jekyll, it's amazing to me how slow it was to build a simple hundred pages of HTML. What Hugo does in Uber a second took Jekyll several minutes.
Re:No One Ever Got Fired for Choosing React by oknoorap on Saturday December 05, 2020 @07:44AM (#25314129)
Have you tried NextJS or Gatsby?
Re:No One Ever Got Fired for Choosing React by anaganisk on Saturday December 05, 2020 @08:42AM (#25314495)
Gatsby and its magic comes no where near Hugo, hugo is basically just select the theme and write markdown Gatsby and its quirks, are just too heavy. I would rather suggest Next.js.
Re:No One Ever Got Fired for Choosing React by oknoorap on Sunday December 06, 2020 @05:00AM (#25322435)
Yep, Next.js export build to static HTML is pretty impressive.
Re:No One Ever Got Fired for Choosing React by otabdeveloper4 on Saturday December 05, 2020 @11:43AM (#25315839)
HTML and CSS and Javascript.
Re:No One Ever Got Fired for Choosing React by danielheath on Saturday December 05, 2020 @07:08AM (#25313953)
For a blog? Give someone a few dollars to run wordpress for you and move on to writing content.
Re:No One Ever Got Fired for Choosing React by andrewingram on Saturday December 05, 2020 @07:13AM (#25313972)
Sure, as far as getting up and running cheaply and quickly is concerned, Wordpress is a great choice.

But most Wordpress-based personal sites I've come across are significantly slower than the React-based personal sites i'm aware of. There's a big problem with abusing plugins that haven't been designed with any kind of performance in mind.

Re:No One Ever Got Fired for Choosing React by cj on Saturday December 05, 2020 @08:16AM (#25314303)
If you're starting a blog, chances are you're going to care a lot about SEO.

Wordpress is a much better starting point from a SEO perspective than a react app built from scratch.

Performance is quick if you put it behind a CDN and disable things like comments (which I suppose you also wouldn't have in a react blog, unless you're building a commenting system from the ground up, too)

Re:No One Ever Got Fired for Choosing React by andrewingram on Saturday December 05, 2020 @10:19AM (#25315156)
Is that really true? I’m not a big fan of Gatsby, but if someone opts to use that, there are enough popular plugins to make all the key SEO work happen pretty automatically.

People building personal sites with React are mostly starting from one of the popular frameworks, these give you pretty sensible defaults for both performance and SEO (for which performance is now a factor).

Re:No One Ever Got Fired for Choosing React by BrianOnHN on Saturday December 05, 2020 @08:06AM (#25314247)
If it's a blog then use a CDN.
Re:No One Ever Got Fired for Choosing React by andrewingram on Saturday December 05, 2020 @10:16AM (#25315118)
This is as true with React as it is with Wordpress. I can’t speak as to wider trends, but anyone using Gatsby or Next.is and deploying on Netlify or Vercel is going to be getting good caching and use of a CDN by default.

My point was that the amount of client-side bloat in a Wordpress personal site seems to be higher than the equivalent React site, and the overall performance seems to be worse.

Re:No One Ever Got Fired for Choosing React by antihero on Saturday December 05, 2020 @07:26AM (#25314037)
Wordpress is extremely horrible the second you want to do anything to it. It's overkill for even blogs, to be honest. You need a database, you need to dockerise it if don't want it to shit up the rest of the server.
Re:No One Ever Got Fired for Choosing React by danielheath on Saturday December 05, 2020 @07:36AM (#25314091)
My whole point is "do not do anything to it". You don't need plugins (I'll make one exception - have & test backups), you don't need docker/database/whatever because you're paying someone else a pittance to deal with that.

If you want a blog, stop fucking around with your configuration and write.

Re:No One Ever Got Fired for Choosing React by jakelazaroff on Saturday December 05, 2020 @09:58AM (#25314989)
> If you want a blog, stop fucking around with your configuration and write.

Agreed — this was the point of the article. Tooling is a distraction from what you wanted to do in the first place. Just pick the one you can get the thing done with, whether it’s Hugo or Gatsby or WordPress or whatever.