Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm going to sound old here, but why use Svelte? Why yet another one? Why not an established framework like React or Vue? I realize Svelte is compiled but it's oh so close to the others, and its performance is only better in certain corner cases. I ask because of learning exhaustion with the plethora of lookalike languages and frameworks and the constant, unending learning curve associated with all front end development now. I'm not dissing creation or incremental progress. I just sometimes don't think the constant change for new languages and frameworks that come with only minor syntax changes or small differences under the hood is worth the never-ending mandatory learning thrust on developers.


I'm going to sound annoying here, but have you actually used Svelte? The developer experience is night and day with Svelte(kit) and React/Vue. I can have a workable prototype within a couple of hours with Sveltekit, where it would've taken me a couple of days in React/Next.js. Svelte feels like an answer to that unending churn of web frameworks because so much of it is just plain HTML and JS, compared to learning the newest React flavour every fortnight.

Further, I don't think it's fair to say that Svelte isn't established, it's in production on some pretty big sites and has been stable for years now.


Yup, I have used Svelte, but not very much at all. Honestly, it didn't strike me as terribly different in syntax from Vue. It's a similar framework (in this case, compiler). It is a common paradigm in marketing that a new technology/product needs to provide 10x the benefit of its predecessors to convince people to switch. Would you say it provides that for you? I just went and reviewed some of the material on it, and see that it's getting known for being easier. This surprised me. You may have convinced me to go take another look.


I don’t know if I’d be able to say I’m 10x as productive in Svelte as React (I havent used Vue enough to compare), but I’d certainly say there’s at least a 2x benefit, which is enough for me. Projects are easier to organise and thus plan, components are easier to build in an encapsulated way, routing works OOTB 99% of the time, and I don’t have to remember whether I’m allowed to use an effect or think about whether a hook is going to grind my page to a halt.


If you decide to use the tutorial, I highly recommend the new one at learn.svelte.dev over the older one at svelte.dev/tutorial. It includes more material on top of being more up-to-date.


And it has a vim mode if you pass "?vim=true" to the url. Why not a button, I don't know but it's nice to have since Firenvim wasn't playing along with CodeMirror


I think this may also be due to the age of the project. Years ago, I could also create a prototype in a few hours in Vue. But as they get older, these frameworks keep getting more complicated. I'm sure Svelte will become like that too in a couple of years.


Since it's evolving to keep up with the best (at least newest) practices but most of that complexity is shoved into SvelteKit the fullstack framework. But Svelte itself, which is only just a transpiler targeting html+js+css offers guarantees that simple things will remain simple. Then it's up to you to buy in the complexity in order to solve complex problems. I am struggling to build a web app right with Svelte (and using SvelteKit with no SSR - SPA mode, I just want to benefit from the builtin client side routing) but the reason I am struggling is not because of svelte is because there are so many things and corner case to learn/know about : js, ts, docker, bundlers/minifier/build system, deployment, servers, http, cors, UI toolkits, css, tailwind, backend, databases, data modeling/validation/orms, Oauth and probably even more. It' overwhelming.


> The developer experience is night and day with Svelte(kit)

Svelte has a cool DX. Best I have seen. SvelteKit not so much.


We actually first created it with https://github.com/blueedgetechno/win11React then I was learning Svelte didn't have any new project ideas so redid it with Svelte and found out its just much better DX. Much easy to maintain + much more :)


Nice! Really interesting to see the difference between the two implementations, comparing the frameworks in something more than the usual toy examples is instructive. FWIW I agree that the Svelte version looks much easier to maintain!


Well that's fair. Glad you found worthwhile performance and other improvements. Kudos on managing to learn Svelte and get this cranked out so fast!


Looks like you haven't tried Svelte for something serious. As someone who used React for a long time and started using Svelte for about 6 months now, there's no way I'm going to go back to React, the DX with Svelte has been that good.


If you've tried all of them and prefer Svelte then why wouldn't you use Svelte?


IMO, the profession of software development should be embarrassed something like react has any traction at all.

Surely it's worth trying to do something better than that?


SolidJS is pretty fun, has JSX, global stores, but with better runtime performance than Svelte


Don't worry! No one's forcing you to try a new framework, it's not mandatory. Part of maturing as a developer is working out what you want to spend your time doing or learning and what you're happy ignoring or leaving to others.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: