HACKER Q&A
📣 jvickers

I hear the complaints about React, but what would be your perfect API?


What would be your perfect API to do the main things you need to do (top priority question)

What features do you not need that are in React?

What features do you need that are not in React?


  👤 nhayfield Accepted Answer ✓
No, not another javascript framework. Do not do this!

👤 wryoak
It’s not about features or the api. It’s about treating everything like a nail. It’s about a bloated build ecosystem. It’s about overwrought webapps that punish users without fiber connections who just want to check their damn bank balance. All we want is a goddamn number and instead we get megabytes of components and pages bundled and prefetched that we’re not going to use.

👤 mejutoco
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.