News for hackers. Stuff that matters.
Re:Ask HN: I hear the complaints about React, but what would... by nhayfield on Thursday September 21, 2023 @02:02PM (#37601484)
No, not another javascript framework. Do not do this!
Re:Ask HN: I hear the complaints about React, but what would... by jvickers on Thursday September 21, 2023 @08:05PM (#37606153)
It's been in the works for years. Very good in some ways, a bit rough round the edges though, but it's time I make a substantial demo, docs and marketing website for it. SSR was built into it from the start.
Re:Ask HN: I hear the complaints about React, but what would... by mejutoco on Friday September 22, 2023 @06:50AM (#37610384)
I use Nextjs with Typescript, and it is pretty close, but if I can dream...

The way Elm lang deals with events is IMO perfect (https://guide.elm-lang.org/architecture/). I prefer that Message passing and having to be dealt with in a single spot, no exceptions, no competing state/event approaches like in react (redux is actually inspired by Elm).

I would be perfectly happy with Elm lang with more community components and server-side-rendering.

The problem is: the first time someone gets frustrated with it and tries to bypass it they prefer a framework that let's you do anything with no constraints at all.

I think this summarizes the problem. For many people the less restrictions the better, the more you can monkey-patch, have everything dynamic the better (passing dicts to functions, not using types). The problem is, these same unconstrained capabilities are what makes the code spaghetti later.

The ideal for me would be a simple model (like Elm lang) that you can apply to many things, and that stops evolving. Unfortunately js frameworks are driven in many cases by self-promotion and popularity, and you cannot self-promote if things just stay stable.

TL;DR; IMHO It is a social problem, not a technical one.