Live data from Hacker News

Qite.js – Frontend framework for people who hate React and love HTML

qitejs.qount25.dev

101–110 of 168 posts

Re: Qite.js – Frontend framework for people who hate React and love HTML

#101
post #14

I'm starting to wonder whether reactivity (not React specifically) was the originally sin that led to modern UI complexity. UI elements automatically reacting to data changes (as oppposed to components updating themselves by listening to events) was supposed to make things easier. But in reality, it introduced state as something distinct from both the UI and the data source (usually an API or a local cache). That int…

In my view, the problem isn't specifically reactivity but the fact that reactivity isn't actually native of the UI toolkit. Instead of HTML, think about GTK or Swing. To add React-style "reactivity" to it, instead of just making a dialog to change the "title" of a document and committing the change when you press OK, you'd need a top-level "App" class that holds all the state, a class for state properties with IDs ac…

I believe every UI developer that has used frameworks like Swing has reached a point where specific user interfaces, even those that look trivial, become too complex primarily due to things like event handlers. Trying to figure out a simple thing like why a radio box is enabled and is marked dirty may require long debugging sessions where one event handler for component A triggers another event handler for component B, which triggers another event handler, etc. And before you know it, 50 events were triggered just during the initial mounting of the UI. Making sense of it all is maddening.

And then said developer does what they think feels right: "I have my state and I simply want all the fields to reflect my state". So they try and rewrite the component into some sort of mini immediate-mode style component. All of the event handlers get wired up a single "layoutComponent" method that tries to call all the UI component setters based on the current state with all the problems you alluded to. I know I've done this type of things numerous times before going back all the way to my first internship, well before React was even a thing.

I think modern frameworks solve the reactivity issue this well enough, that it really doesn't matter if the underlying framework is not natively reactive. I will say though that I've primarily used Vue.js where most state is relatively local and we don't try to re-render the world on every input. I think part of the problem with modern dev is likely that React has become the default instead of a simpler framework like Vue.

Re: Qite.js – Frontend framework for people who hate React and love HTML

#102
post #6

IMHO, you shouldn't make "hate" part of your tagline. Maybe focus on a use-case? Something like, "No-build, no-NPM, SSR-first JavaScript framework specializing in Time-to-interactive" - maybe?

This just sounds like every js framework that comes out every week and would never get as much attention. OP just did something marketers call “positioning” right.

Re: Qite.js – Frontend framework for people who hate React and love HTML

#103
post #58

Have tried multiple approaches. Sevelte. HTMX. Everything in between. And came to conclusion that after certain complexity of UI - React kind of components are unavoidable if you want to be able to reason about your code. Think of Shopify admin panel with product variations each variation having different pictures and what not. Not saying not doable in plain JS. But then Chrome can be written in NASM too, C++ is just…

Shopify is quickly moving to Preact, and you can see that is paying off, I now see changes on the dashboard every week instead of every 6 months

Re: Qite.js – Frontend framework for people who hate React and love HTML

#104
post #14

I'm starting to wonder whether reactivity (not React specifically) was the originally sin that led to modern UI complexity. UI elements automatically reacting to data changes (as oppposed to components updating themselves by listening to events) was supposed to make things easier. But in reality, it introduced state as something distinct from both the UI and the data source (usually an API or a local cache). That int…

> I'm starting to wonder whether reactivity (not React specifically) was the originally sin that led to modern UI complexity

I've always maintained that no reactivity is a much simpler mental model. Mithril and Imba do this with better than good enough performance.

I think Remix 3 will be following this approach too.

Re: Qite.js – Frontend framework for people who hate React and love HTML

#105
post #14

I'm starting to wonder whether reactivity (not React specifically) was the originally sin that led to modern UI complexity. UI elements automatically reacting to data changes (as oppposed to components updating themselves by listening to events) was supposed to make things easier. But in reality, it introduced state as something distinct from both the UI and the data source (usually an API or a local cache). That int…

I genuinely don't understand why this model is the norm. As a game developer working in my own engine, UI is unbelievably straight-forward: the game has state. The master Render() function draws all of the graphics according to the current state, called at framerate times per second. Nothing in Render() can change the state of the program. The program can be run headlessly with Render() pre-processed out completely.…

Games can afford the luxury to re-render everyting on every frame. The DOM? Not so much.

This bottleneck could be alleviated if browsers shipped native dom morphing or even some kind of native vdom but we're stuck with userland js solutions.

Re: Qite.js – Frontend framework for people who hate React and love HTML

#106
post #46
post #14

I'm starting to wonder whether reactivity (not React specifically) was the originally sin that led to modern UI complexity. UI elements automatically reacting to data changes (as oppposed to components updating themselves by listening to events) was supposed to make things easier. But in reality, it introduced state as something distinct from both the UI and the data source (usually an API or a local cache). That int…

Absolutely. Look at facebook today. Back in 2010, everything had just the right amount of interactivity. Because, separation of concerns existed at the language level - HTML for structure and CSS for presentation, JS for everything else. Then some bunch of geniuses decided it would be awesome to put everything together in the name of components. Today, you open facebook, the creators of React - normal drop-down with…

If the html+css+js trifecta was any good for creating UI beyond simple forms, we would not have witnessed the cambrian explosion of ways to do it differently. Reactivity itself was an answer to the pain of using MVC and similar approaches in older GUI toolkits not made for the web. The pain did not stop entirely, of course, because GUI is a complicated and ill defined problem - but I don’t look back fondly to programming without it.

Re: Qite.js – Frontend framework for people who hate React and love HTML

#107
Rails does this perfectly with Turbo and Stimulus, Turbo does HTML-over-the-wire via SSR-first, server responds with small updates/appends of HTML as need etc, and then you lightly use stimulus JS controllers for the small stuff where HTML/forms don't make sense. https://hotwired.dev/

Re: Qite.js – Frontend framework for people who hate React and love HTML

#108

Earlier quoted context omitted.

I genuinely don't understand why this model is the norm. As a game developer working in my own engine, UI is unbelievably straight-forward: the game has state. The master Render() function draws all of the graphics according to the current state, called at framerate times per second. Nothing in Render() can change the state of the program. The program can be run headlessly with Render() pre-processed out completely.…

Isn't that what reactive ui trying to achieve? To only have a render function and have ui state sync according to the data?

Games do not sync data, they literally say what should be drawn on the screen, from scratch, 60+ times per second. They are in control of the entire process. They do not need to deal with DOM manipulation overhead because there is no DOM.

Re: Qite.js – Frontend framework for people who hate React and love HTML

#109
post #104
post #14

I'm starting to wonder whether reactivity (not React specifically) was the originally sin that led to modern UI complexity. UI elements automatically reacting to data changes (as oppposed to components updating themselves by listening to events) was supposed to make things easier. But in reality, it introduced state as something distinct from both the UI and the data source (usually an API or a local cache). That int…

> I'm starting to wonder whether reactivity (not React specifically) was the originally sin that led to modern UI complexity I've always maintained that no reactivity is a much simpler mental model. Mithril and Imba do this with better than good enough performance. I think Remix 3 will be following this approach too.

Is this a satire thing or will it really be remix3? Didnt they just rebrand to react router FROM remix??

Re: Qite.js – Frontend framework for people who hate React and love HTML

#110

"If you hate react" feels like very bad argument in engineering. Anyway, interesting approach for up to medium pages (not apps!). Totally not replacement for react.

One meaning people often use 'hate' word for is discomfort. It's often very subjective but it's not necessary a bad argument.
Post reply on HN