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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Svelte 5 and the Future of Frameworks: A Chat with Rich Harris

118 点作者 ulrischa4 个月前

18 条评论

infecto4 个月前
I love love love Svelte&#x2F;Sveltekit. I am an experienced backend engineer and this is the first time I have worked in a FE framework that just clicked.<p>What I like:<p>- Not a whole lot of magic syntax.<p>- The structure of files feels like I am building a backend app, its quite logical and easy to parse through.<p>- Easy to get up and running, I am sure the decisions exist but I struggle historically with all the sidecar products that can be added into the frontend framework.<p>- It combines the beauty of native JS&#x2F;TS with svelte. I can hydrate a store with my own hand rolled api calls.<p>- There is not a whole lot going on from a API&#x2F;user perspective. I have stores and routes which are built into the folder structure. I am sure there is more but that gets me to a useful MVP.
评论 #42859936 未加载
评论 #42860187 未加载
评论 #42859595 未加载
评论 #42865147 未加载
评论 #42860413 未加载
评论 #42873757 未加载
评论 #42873751 未加载
nhumrich4 个月前
I loved svelte. But svelte5 seems to be a bit of turn off. It&#x27;s not even the runes. Slots was hands down the best feature of svelte. And they deprecated it I still can&#x27;t for the life of me figure out how the new way is supposed to work. The migration docs are very limited. And it&#x27;s super weird that the parent has to intentionally render children instead of a slots? Also, why deprecate the on:event syntax?
评论 #42865802 未加载
评论 #42859699 未加载
评论 #42861983 未加载
tobr4 个月前
I’ve been using Svelte for several years, but haven’t had much time to dive into the many changes in 5.<p>Maybe someone here can shed light on something about runes that feels very off to me. The rune is on the wrong side of the equal sign? Like:<p><pre><code> let counter = $state(0); </code></pre> Looks like a reactive value assigned to a variable, but that’s not at all what’s going on. It’s actually a reactive variable initialized to 0. So, for example, despite what you’d expect you can’t even move the $state call into a utility function if you’d have some reason to. Very counterintuitive to me, and not really touched upon in the docs as far as I’ve seen, but I have to assume there’s some practical reason why they did it this way.<p>I remember Svelte 2 (or 1? Can’t remember) had some weird things like this as well, where you’d think you could do something based on your experience from JavaScript but it just wasn’t supported. The label syntax in Svelte 3 was pretty brilliant because it was a clear indication that you shouldn’t expect normal JS rules to apply. It did have other problems that they appear to have fixed though.
评论 #42859292 未加载
ribadeo4 个月前
I fell in love with Svelte at v3.<p>The Svelte 5 rollout feels like a frogmarch. The v3 docs and repls and tutorials are gone, not api versioned. The new docs are bad, IMO, conpared to the clear documentation 3 and 4 had for years, with constant blurring with SvelteKit, which is a server framework, no thanks. The new docs font appears designed to make one cease reading. The new syntax is ugly and verbose and vague, IMO, but admittedly i am having difficulty with the documentation, which may be the real issue. If there were a translation guide from how one does things in Svelte 3 to Svelte 5 it might feel less like learning a new framework. Well, nothing lasts forever.
评论 #42863322 未加载
评论 #42861709 未加载
ggregoire4 个月前
I&#x27;ve yet to find a problem with React that would justify learning one of those new frameworks. I know it&#x27;s popular to say React is bad on the internet, but have been using it for 10 years now and it&#x27;s still going strong in my opinion.<p>(For some background, I used to code SPAs from scratch with vanilla JS and jQuery in the 2000s, then switched to backbone.js then Angular, before picking up React that solved all the design issues of Angular)
评论 #42859149 未加载
评论 #42858872 未加载
评论 #42858979 未加载
评论 #42860255 未加载
评论 #42861804 未加载
评论 #42859976 未加载
jerojero4 个月前
I really like svelte 5, personally I find the rune system to be much more explicit about what the code is doing and I prefer that.<p>I always felt that reading svelte code (prior to svelte 5) required to understand a sort of &quot;magic syntax&quot; very well, which was off putting.<p>I don&#x27;t really mind having to declare reactive variables as `$state()`, it makes it very explicit that we want the variable to be reactive. It seems this change has also allowed for a lot more powerful and reusable code so I&#x27;m all for it. I guess that people who were already in the ecosystem might have found that they had to learn a lot of new stuff but imo this is very much a case of &quot;might be a bit painful for our current users but it&#x27;ll make life easier for everyone else in the future&quot;.<p>There&#x27;s a few things I am a bit conflicted with but it&#x27;s probably due to myself not really knowing how to solve a determinate problem rather than a problem with the framework itself. It&#x27;s a bit difficult to get help sometimes.
rykuno4 个月前
Svelte(kit) renewed my love for web development. It gets out of the way when i want it to, is build on web standards so i&#x27;m not stuck on annoying &quot;gotchas&quot;, and has all the tools I need to build something without pulling in 20 dependencies just to build a basic app.<p>After being a skeptic of svelte 5, its fully captured me.
pickle-wizard4 个月前
I recently started on a frontend project using Svelte, knowing nothing about frontend development. I&#x27;ve found it very easy to use. I had a few failed attempts at this project in the past using React, but I found it quickly overwhelming.<p>The tutorials on the website are excellent and that was all I needed to get started.
bunsenhoneydew4 个月前
A team I work very closely with as an architect has ditched React in favour of Svelte and the team love it. Everyone prefers it to React and finds it easier and more productive to use.
bgdkbtv4 个月前
I love Svelte and v5 is real nice with runes, what an incredible update. It works amazingly well with Elixir Phoenix thanks to live_svelte package.
ptsd_dalmatian4 个月前
After years of react, svelte is such a relief. It’s such a joy to do webdev again. Claude’s auto completions in Cursor are often not great though.
评论 #42863578 未加载
评论 #42860782 未加载
jaeming4 个月前
I was one of those that really felt like Runes was going to ruin svelte. But after working with it on a small team for a month now, I can see the benefits. We previously had a lot of devs confused with `$:` and other reactive issues. It had always made perfect sense to me but I have to admit, it was a bit magical which was apparently too much for some. With the runes stuff I&#x27;ve seen it click with people in ways it didn&#x27;t previously. I did like the elegance of the old syntax but I&#x27;ll take the explicitness of runes if it gets my team on board and causes fewer issues.
replwoacause4 个月前
Maybe I’m in the minority but I still love me a good ole SSR app with either some vanilla JS or jquery sprinkled on it. Seems to do just fine for my needs but then again, I’m not building highly complex applications. Just a bit of interactivity is all I need, and it suits me just fine without needing any build steps.
评论 #42873506 未加载
msie4 个月前
All these frameworks just tell me there is a big problem with the way browsers deliver web apps.
评论 #42859239 未加载
评论 #42859601 未加载
autocole4 个月前
My magic wand wish is that they publish a separate rollup plugin for the rune syntax only, then allow me to write my ui in another jsx based framework
654 个月前
It seems obvious to me the next generation front end frameworks will not use a virtual DOM, which at this point seems antiquated and slow.
评论 #42859551 未加载
评论 #42871216 未加载
vergessenmir4 个月前
The push of to SSR in Svelte5 has been so off putting. I know CSR is possible but 1) it&#x27;s not easy, and 2.) practically undocumented
评论 #42873514 未加载
评论 #42954617 未加载
lakomen4 个月前
Too barebones for my taste. Small ecosystem. Lots of manual fiddling. Prefer React currently.<p>I use Svelte when I want static site generation. It&#x27;s good for that.<p>I hate that it&#x27;s all different from v4 to v5.