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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Svelte 5 release candidate (RC)

32 点作者 benmccann大约 1 年前

7 条评论

snide大约 1 年前
I&#x27;m the person that&#x27;s been using React for 10 years and suddenly thought... I wonder what the big deal with Svelte is? I built a non-trivial project in Svelte for my personal site and something weird happened. I was having fun again. Svelte feels pretty close to vanilla and I like that the code I&#x27;m writing feels a lot more similar to how I wrote code before I ended up in React. Style tags, script tags, easy assignment of variables, no useEffect head-scratching. You declare things, you change them, and it mostly just works. The code looks pretty similar to a regular old webpage.<p>My favorite thing about learning Svelte was that it has my favorite &quot;documentation&quot; of any library. It&#x27;s just a list of code samples showing various different scenarios [0]. This made it dead easy for me to understand its way of doing things without needing to get too deep into the methodology.<p>[0]: <a href="https:&#x2F;&#x2F;svelte.dev&#x2F;examples&#x2F;hello-world" rel="nofollow">https:&#x2F;&#x2F;svelte.dev&#x2F;examples&#x2F;hello-world</a>
评论 #40217800 未加载
gedy大约 1 年前
I say this as a long time Svelte fan, and maintained some libraries for past 7 years: I really don&#x27;t like the DX of &quot;runes&quot;. What I liked about Svelte was the two way and automatic reactivity, clever computed values prefixed with $:, etc. The code looked simple and clean.<p>I know there&#x27;s very good reasons for the changes, but it feels so similar to React (and even hooks) now that I don&#x27;t see any big positives to using Svelte vs just using React. Sorry Rich.
评论 #40238484 未加载
评论 #40221924 未加载
move-on-by大约 1 年前
&gt; In Svelte 3 and 4, components are classes. In Svelte 5 they are functions and should be instantiated differently.<p>This is classic React!
评论 #40239827 未加载
purple-leafy大约 1 年前
Happy for the Svelte team.<p>I picked up Svelte 3, and 4 last year and used it to build many browser extension UIs.<p>I really enjoyed my time with Svelte but I found it did not scale well. Maybe that’s a me problem though.<p>I’ve since switched over to using React, and I’m really enjoying writing React. NOT working with others React code though, that still sucks.<p>But I’ve actually switched to using React for my browser extension UIs. Prefer it
ravenstine大约 1 年前
I agree with Rich&#x27;s take that classes are mostly bad when you do things like inheritance.<p>However, I don&#x27;t really know why he thinks classes are awesome <i>without</i> inheritance, either. Once you do away with inheritance, what&#x27;s the benefit over writing a function that builds an object? Get rid of the middle man, the extra keywords, the prototype chain, etc., and go with a function. Did I miss something?
评论 #40237985 未加载
danielscrubs大约 1 年前
I started using Svelte 4 as I got tired of React constantly changing. Jokes on me it seems.<p>Any recommendations for building SPAs that can last a decade without constant rewrites?
评论 #40307780 未加载
评论 #40236967 未加载
vbilopav大约 1 年前
I&#x27;ll just keep on using Svelte 4