News for hackers. Stuff that matters.
Re:React 19 Breaks Async Composability by anonzzzies on Friday June 14, 2024 @03:16AM (#40678367)
Terrible shitshow. Web dev is all broken and horrible. Well at least the popular stuff is. No idea why anyone uses this outside resume building.
Re:React 19 Breaks Async Composability by sir_pepe on Friday June 14, 2024 @03:57AM (#40678628)
Fortunately it is very easy to opt out of all of this. Nothing stops you from having a backed deliver HTML and then sprinkle some basic JS and CSS on top. In theory at least, in practice everybody's brain has been smashed to bits by repeatedly colliding with the hype train. But the old approaches still work, even better than in the old days (thanks to improvements to all the relevant standards).
Re:React 19 Breaks Async Composability by anonzzzies on Friday June 14, 2024 @05:13AM (#40679052)
Well yes, but people do write for resumes, not for anything else. For quality we would live in another world.
Re:React 19 Breaks Async Composability by hi-v-rocknroll on Friday June 14, 2024 @06:55AM (#40679570)
Yep. And there's also Phoenix, Rails, and Htmx.
Re:React 19 Breaks Async Composability by wordofx on Friday June 14, 2024 @03:23AM (#40678418)
HTMX is the way forward.
Re:React 19 Breaks Async Composability by FriedrichN on Friday June 14, 2024 @03:40AM (#40678524)
Nothing is the way forward. It's programming, we make stuff that does stuff. Preferably with stuff that makes making stuff that does stuff easier and with stuff that will be supported for a long time.

Maybe I'm too cynical, but whenever something is presented as some messianistic "way forward" I just think "ah yes, another way forward" but feel we're mostly moving laterally.

Re:React 19 Breaks Async Composability by ht85 on Friday June 14, 2024 @03:57AM (#40678627)
It is exactly that. We make stuff, problems arise, we make new stuff that does not suffer from said problems.

Because everything is a trade-off, new stuff creates new problems. Those are the problems complainers complain about, ignorant of their history.

The cycle then repeats.

Maybe I am not cynical enough but doing easy things from the past is completely trivial and doing unimaginable things from the past is not that hard anymore. Looks like the cycle has some forward momentum in the end!

Re:React 19 Breaks Async Composability by anonzzzies on Friday June 14, 2024 @07:16AM (#40679686)
But it all suffers. We have been doing web dev for 30 years and it all works fine, fast and scalable. I am not sure what other people are so obsessed with but we don’t have these issues.
Re:React 19 Breaks Async Composability by meiraleal on Friday June 14, 2024 @08:18AM (#40680162)
React since 17 feels like coding with LLMs: it had a bug, they asked ChatGPT to fix it, it addes more bugs, they asked ChatGPT to fix all of them and now we have a useless piece of software completely unrelated with the initial solution
Re:React 19 Breaks Async Composability by wordofx on Friday June 14, 2024 @07:42AM (#40679843)
So if we use stuff to make stuff easier why are people still trying to bang nails in with a piece of glass by using react when easy was using html/css/js made easier with htmx?
Re:React 19 Breaks Async Composability by FriedrichN on Friday June 14, 2024 @08:17AM (#40680160)
Well call me a heathen, but I've never even considered React. Instead I always generate HTML server side and spruce it up using a little JavaScript if necessary (I even use jQuery sometimes). It's reliable, works fast, easy to debug, requires little maintenance, doesn't require a build chain of >100K files of several hundreds of megabytes.

Of course I'm open to the possibility that I'm Doing It Wrong™.

Re:React 19 Breaks Async Composability by mrkeen on Friday June 14, 2024 @03:31AM (#40678469)
Is that a document markup language?

Maybe backend programming will become a lot simpler and easier and once they release XML2.

Re:React 19 Breaks Async Composability by Akronymus on Friday June 14, 2024 @03:42AM (#40678535)
It's essentially a small extension of HTML via JS, that allows all elements to fetch HTML from a server on events, and replace a target elements inner/outer html/append to it. From their page [1]:

motivation

    Why should only <a> & <form> be able to make HTTP requests?
    Why should only click & submit events trigger them?
    Why should only GET & POST methods be available?
    Why should you only be able to replace the entire screen?
By removing these constraints, htmx completes HTML as a hypertext

[1] https://htmx.org/

Re:React 19 Breaks Async Composability by rjh29 on Friday June 14, 2024 @05:08AM (#40679021)
This is just hype, just like with React years ago. There is no "one true way forward"

Besides, HTMX is just HTML with JS on top which devs have been doing for literally 20 years. Rails had that kind of functionality in 2005 because I remember using it.

Re:React 19 Breaks Async Composability by wordofx on Friday June 14, 2024 @07:40AM (#40679826)
Yeah. We built junk like react because browsers sucked. Compute was expensive. We pushed processing to the client so someone else could pay for it.

Now we have gone full circle back to building web apps using something like htmx and no longer have a complicated mess to deal with. Render html on the server. Push it to the client.

Re:React 19 Breaks Async Composability by lakomen on Friday June 14, 2024 @06:31AM (#40679447)
No it's not
Re:React 19 Breaks Async Composability by sebazzz on Friday June 14, 2024 @02:36PM (#40683590)
If you want to reduce maintenance costs, yes. Javascript is a shitshow of constant breaking changes left and right, whether it is in your runtime framework, or your build system like gulp or more prominently webpack. Try maintaining 10 projects with these frameworks. You'll quickly look for something that is not as maintenance intensive.

No, you can't stay on Webpack version X, because (real example) it turned out that version of webpack relied on md5 which wouldn't work in newer node.js versions.

Re:React 19 Breaks Async Composability by hi-v-rocknroll on Friday June 14, 2024 @06:50AM (#40679542)
It's a jobs program. Maximize breakage and churn for everyone while disrespecting compatibility and stability.
Re:React 19 Breaks Async Composability by pragmatic on Friday June 14, 2024 @12:21PM (#40682168)
There’s hope.

Vanilla js with type annotations via jsdoc and a build less setup works amazingly well now.

I’m rebuilding our companies data viz with this set up as the “glue” between apis and charts.

Throw in web components and for some use cases I think you really don’t need react, etc.