TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

1 点作者 jvickers超过 1 年前
What would be your perfect API to do the main things you need to do (top priority question)<p>What features do you not need that are in React?<p>What features do you need that are not in React?

3 条评论

nhayfield超过 1 年前
No, not another javascript framework. Do not do this!
评论 #37606153 未加载
mejutoco超过 1 年前
I use Nextjs with Typescript, and it is pretty close, but if I can dream...<p>The way Elm lang deals with events is IMO perfect (<a href="https:&#x2F;&#x2F;guide.elm-lang.org&#x2F;architecture&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;guide.elm-lang.org&#x2F;architecture&#x2F;</a>). I prefer that Message passing and having to be dealt with in a single spot, no exceptions, no competing state&#x2F;event approaches like in react (redux is actually inspired by Elm).<p>I would be perfectly happy with Elm lang with more community components and server-side-rendering.<p>The problem is: the first time someone gets frustrated with it and tries to bypass it they prefer a framework that let&#x27;s you do anything with no constraints at all.<p>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.<p>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.<p>TL;DR; IMHO It is a social problem, not a technical one.
wryoak超过 1 年前
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.