Live data from Hacker News

If not React, then what?

infrequently.org

61–70 of 756 posts

Re: If not React, then what?

#61

The people who don't think React (or Vue) is important are the same ones who have never worked on a large project with lots of screen updates and state changes that absolutely cannot be avoided. React is still #1 in popularity, and the most crucial tool for almost any web developer (aside from using TypeScript, instead of plain JS which is also critical for large projects) React is reported to be used by 39.5% of dev…

Generalizing much? React is as popular as it is because of inertia. React holds an important space but its hardly the only tool that can succeed in a "large project with lots of screen updates and state changes". That's ridiculous.

The reason I said "(or Vue)" was specifically to say that there are other leading frameworks. I didn't say "or Angluar" because in my opinion it's a race between React and Vue at this point. But if you think there's a third contender, let me know. I'm always looking to learn.

My main point was to compare "frameworks" v.s. "no frameworks", rather than to say that React is best, but if you want my opinion then yes I do say React is indeed the best, and I admit it's an opinion not a fact. lol.

Re: If not React, then what?

#62

> Frameworkism isn't delivering. Correct. The reason is not the frameworks but the languages. What is needed is a much more high-level and feature-powerful language. Just look at react. Passing down dependencies/values is a pain. So what did react do? It introduced contexts. Similar, other react addons try to solve this problem. But they all sacrifice type-safety in the process. They simply cannot solve this problem;…

The React team should have done their own language, rather than making it a framework/library. Then they could ensure the absence of side effects in rendering code, and had a better way of detecting updates. The knowledge about how to do this was already out there for many years before they started: https://en.wikipedia.org/wiki/Functional_reactive_programmin...

Yes, but if they did their own language it would have almost certainly died in obscurity.

React won because it solved a real pain point for a group of people, using the techniques they were already using... but better!

Having built large apps in angular, handlebars, and jquery... it was (and still is) a godsend for building highly interactive, stateful web applications.

I am deeply skeptical of some of the stuff that people are doing now wrt. putting backend logic into React components, but the fundamentals of React are still very reasonable to me.

Re: If not React, then what?

#63

Earlier quoted context omitted.

Tell that to all the former PHP developers. Where are these performant React sites? The largest and best tech companies out there certainly can’t do it.

The same former PHP developers responsible for all those slow WordPress sites?

The ones who made react.

Re: If not React, then what?

#64
post #2

I read through this to hopefully save all of you the clickbait and mid-way through nonsensical philosophical diatribe. It's a bit ranty and devoid of technically-caloric content. The author is advocating for use of plain HTML/SSR patterns and avoiding SPAs and complicated frameworks/libraries ala Angular/React/etc. It's an old thought that lines up with the "you don't need JS" crowd. Oh, and the author would like to…

You can read it that way if you ignore the rest of the article, I guess. They simply are saying many (most?) sites do not need to be SPAs and the baggage that entails with load times and latency. Follow a process to determine what is really needed based on objective requirements and then use objective measures to ensure it does not degrade the experience. In most cases later frameworks are slow and bulky. I certainly…

Nah, the rest of the article is not insightful either.

eg React Native is dismissed in 5 sentences, with no real solution at all given to the basic problem of wanting to have a website and mobile apps without writing your app 3 times. Let alone a website + mobile apps + windows + mac clients. The suggested solutions do not address this need -- eg there's some Apache crap that no one I've heard of uses (it's renamed Adobe Phonegap crap that Adobe bailed on and tossed over to Apache); some random link to a 5 year old google i/o presentation; etc.

As far as I know, there's basically 3 toolkits that offer this: React + derivates; Rails with Hotwire; and Flutter, which means trusting Google (fools only), and which has recently deprioritized desktop... so that's a rock solid foundation to pour millions of dollars of eng time into. And I guess Xamarin, if anyone is using that.

Re: If not React, then what?

#65
post #60

Earlier quoted context omitted.

If every user input causes a page refresh, that's not an "app" that's a "website". If you don't have any executable code (i.e. Javascript), but just form submits, yeah I agree that's what most of the web is, and as you pointed out most of the web is websites not web apps.

Have you explored cross-document view transitions? Would you classify something that uses those as an app or a site? https://developer.chrome.com/docs/web-platform/view-transiti...

That's actually rather new so we shall see how frontend practice reacts. I've only seen a few instances of it out in the wild so far.

Re: If not React, then what?

#67

The people who don't think React (or Vue) is important are the same ones who have never worked on a large project with lots of screen updates and state changes that absolutely cannot be avoided. React is still #1 in popularity, and the most crucial tool for almost any web developer (aside from using TypeScript, instead of plain JS which is also critical for large projects) React is reported to be used by 39.5% of dev…

Ha and jquery was pretty high too. How is that an argument?

I'll happily ditch React once something better emerges. I've been doing web development since 1998, so I'm used to change.

Re: If not React, then what?

#68

I think React is fine, especially when using it mainly for rendering, keeping async stuff out of the components as much as possible. The React API is way nicer to construct DOM trees than using Fragments, creating and appending children elements, concatenating strings to produce HTML, etc. Imagine being able to do this without importing any 3rd party code: const content = html` Hello world! `; // New API: html Tagged…

... also TFA conflates web application architecture with frontend frameworks, creating a false dichotomy. For instance, I’m building a site that serves static HTML but still benefits greatly from Preact for the dynamic parts.

The critique seems focused on SPA architectures heavily based on React, as seen in frameworks like Next.js and Remix. To be clear, I also lean away from that style of web application architecture, but I’m not sure this 20-page article effectively makes the case for simpler alternatives.

Re: If not React, then what?

#69
post #60

Earlier quoted context omitted.

If every user input causes a page refresh, that's not an "app" that's a "website". If you don't have any executable code (i.e. Javascript), but just form submits, yeah I agree that's what most of the web is, and as you pointed out most of the web is websites not web apps.

Have you explored cross-document view transitions? Would you classify something that uses those as an app or a site? https://developer.chrome.com/docs/web-platform/view-transiti...

I'm not saying my own definition of "app" is the only correct definition, but in my opinion only if I do a click and something on the SAME page changes, then it's an app. Transitioning to different pages isn't an app, imo.

Re: If not React, then what?

#70
post #30

Earlier quoted context omitted.

Were you using a ~$2000 laptop on a broadband connection?

Out of curiosity I checked on iPhone 14/4g and 2018 Intel MBP. I don't get what the point of these comments is ? If you're using RPI with a 2g connection you'll have a bad experience shopping at the site ? And somehow that's supposed to factor in to my tech stack decisions ?

Do you not care about most of your potential customers, or do you only cater to high net worth people? If so, then sure, substandard devices and connections can be ignored. If you’re Target, on the other hand, you probably shouldn’t ignore them.

I find it extremely odd that this was even a question on this site. Do you think the problem you’re solving should impact your tech stack at all, or is your tech stack more important than the problem?

Post reply on HN