←back to thread

50 points senfiaj | 6 comments | | HN request time: 0.001s | source | bottom
Show context
usrbinenv ◴[] No.45809379[source]
If I could make one law related to software, it would be to ban React and React-like frameworks (includes Vue and Svelte I believe): if you have to put more than one line of HTML in your JavaScript, if you have VDOM, if you have a build step - I want this to be illegal. It is entirely possible to write a js-framework that attaches itself to DOM from the top, without any kind of expensive hydration steps or VDOM or templating (I've built one). React is a horrible complex monster that wastes developers time, heats up users' CPUs and generally feels super slow and laggy. 99% percent of websites would work a lot better with SSR and a few lines of JavaScript here and there and there is zero reason to bring anything like React to the table. React is the most tasteless thing ever invented in software.
replies(3): >>45809418 #>>45809650 #>>45809781 #
1. anon-3988 ◴[] No.45809418[source]
Why not ditch HTML itself? People are already downloading binary blobs on a daily basis anyway, just download some binary once, execute them in some isolated environment. So you only have to transmit data.
replies(3): >>45809476 #>>45809497 #>>45809616 #
2. WesolyKubeczek ◴[] No.45809476[source]
Ehrm, have you seen how fancy UI stuff is being implemented in so-called "native apps" these days? Anything more complicated than a button or label or other elements familiar since 1993 gets shoved into a webview and rendered with HTML and CSS.
3. usrbinenv ◴[] No.45809497[source]
I don't see a problem with HTML. It's easy to learn, easy to use and a very nice format for web. CSS is also great. JavaScript is pretty great too. My point is that modern web is horrible because people with no taste and no understanding of the underlying technologies turned it into a horrible shitshow by inventing frameworks that turn the web upside down and making a bloat out of it. I don't hate many things in life, but this one - with passion, because every time I visit a website, I can just feel it's made with React because of how slow and laggy it is.
4. graemep ◴[] No.45809616[source]
Do not know to what extent you are serious, but I think the idea is that content should be HTML and apps should be just JS.

We could go further and have a language written to run in a sandbox VM especially for that with a GUI library designed for the task instead of being derived from a document format.

replies(1): >>45809641 #
5. usrbinenv ◴[] No.45809641[source]
Yeah, I think my point was misunderstood: part of what I'm opposed to was writing HTML (or worse, CSS) inside .js files.
replies(1): >>45813050 #
6. graemep ◴[] No.45813050{3}[source]
Yes, I think you were misunderstood.

I think HTML inside JS is a code smell. I cannot even imagine why you would need CSS inside JS.