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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

React 19 Beta

54 点作者 DustinBrett大约 1 年前

6 条评论

niyazpk大约 1 年前
Since the introduction of Hooks, I&#x27;ve been struggling with understanding React and React code. For context: UI development is not my full-time job (anymore), and I mostly do backend dev these days. I still read&#x2F;write React once in a while, but I don&#x27;t enjoy it anymore.<p>Here is what I am struggling with: I am not able to grasp the programming model with Hooks. I am not able to read the code easily, nor am I able to easily understand the interactions in the app. &quot;easily&quot; being the keyword here. I <i>can</i> understand what is happening if I put in the effort, but every time, it is a struggle. I switch between languages and platforms all the time, but react code is where I have to take a real pause to understand what is going on.<p>My suspicion is that this has to do mostly with the names of the Hooks, and how they are used in the code.<p>* Why are they named useState, useEffect etc? Are there better names if used will make it easier for me to read this code? Are there any other systems&#x2F;languages (even in JS) where similar constructs are present? What are their names?<p>* If JSX is anyway getting compiled to JS, why do I have to still deal with strange looking useState and useEffect declarations? Is there a way to get cleaner syntax and make React code read like regular code?<p>This is mostly a cry for help, and not a criticism of React. I have used React in the past (several years ago, before Hooks) and I used to &quot;get&quot; React.
评论 #40176340 未加载
评论 #40217930 未加载
评论 #40180348 未加载
评论 #40173412 未加载
评论 #40178411 未加载
评论 #40175534 未加载
评论 #40180160 未加载
throwitaway1123大约 1 年前
Hidden amongst all those updates is the fact that React finally supports custom elements. Advocates of web components can finally just say &quot;web components work in every framework&quot; without adding any disclaimers about React [1].<p>[1] <a href="https:&#x2F;&#x2F;custom-elements-everywhere.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;custom-elements-everywhere.com&#x2F;</a>
Justsignedup大约 1 年前
Wow. useOptimistic is seriously cool. These are all really great tools to eliminate more and more boilerplate. Can&#x27;t wait to put it all into use.<p>Gotta say, I really love what the react team has been doing, sure it hasn&#x27;t always been perfect, but it really feels like inching closer to a very smooth developer experience very time.
nsonha大约 1 年前
Some inconsistencies here, metadata is added via jsx but preloading resources is done by some magic functions. Are they not hooks? what are they? Why there need to be this other way to make side effects?
Alifatisk大约 1 年前
It&#x27;s been a couple of years since I was into React. What&#x27;s the state of React? Where is it headead now? Are we over the SPA thing and returning to the age old RoR way?
评论 #40172157 未加载
评论 #40172282 未加载
评论 #40172705 未加载
评论 #40169581 未加载
评论 #40169393 未加载
评论 #40175456 未加载
darepublic大约 1 年前
With the introduction of this &quot;actions&quot; stuff I have finally completed the last step to becoming the simpsons&#x27; meme &quot;old man yells at &lt;react&gt;&quot;. As in, after using it since around 2016 I think I will be looking for something different.