Live data from Hacker News

Svelte 5 Released

npmjs.com

91–100 of 254 posts

Re: Svelte 5 Released

#92
post #15

Where would one even start learning more about front-end development in today's world? Ignoring the dizzying amount of frameworks, how could I become knowledgeable enough to connect my back-end experience to design the "full stack?"

React is still the most popular framework by a good margin. If your goal is to find work I'd start there, love it or not.

Re: Svelte 5 Released

#93
post #27
post #23

What's the preffered way to make simple SPAs using Svelte now? I'm using this +layout.ts with sveltekit: > export const ssr = false; export const prerender = false; But it feels awkward for real SPAs - internal applications that have no need for server side rendering.

What's the goal of disabling SSR though? I get that hydrations value is mainly in SEO and a tiny improvement in initial draw speed, but why would you want it disabled, specifically? It's pretty much what you already wrote though. https://kit.svelte.dev/docs/single-page-apps

We don't run node servers.

Re: Svelte 5 Released

#94

Why should someone use Svelte 5 over Vue 3? Performance might be the only reason IMO, but once Vue Vapor is release that will most likely not be an advantage. The Vue3 and Svelte 5 API are almost the exact same, but Vue can be used in TS/JS and Svelte 5 can't. I do think SvelteKit is better than Nuxt by a lot. Maybe that's a big advantage.

Well I don't know how Vue3 is but I used Vue before, don't know exactly which version it was.

I found the mental model behind managing state in Vue a little difficult. There was a lot of syntax I had to learn/understand before I could work with it. OTH when I first worked with a svelte working with the code base was extremely straightforward, and that was my very first time touching JS.

I think the main reason for Svelte5 to exist was that state can now be shared beyond the boundaries of a .svelte file. They needed a reactive stateful primitive which is the $state addition.

I recently tried to start building something in NextJS, I worked with react a little bit and thought it really isn't going to be that hard. I honestly didn't get far, I really needed to understand a bunch of concepts before I could just start working. This isn't something I experienced when I started working with Dart&Flutter.

I appreciate all of the work other authors have put in to make UI in plain JS and not bend the language to their whims, but I don't think UIs can be built ergonomically without that. Historically UIs have always been best expressed in languages built around that fact. HTML, CSS and Vanilla JS pushed the envelope for UI development but with what's expected from UIs in this age of browser based computing, that model just doesn't age as well given the complexity it adds.

It's why I reckon people won't give up on making UI frameworks in Rust, because it's macro system allows the authors to build supports around a language that really could not get far on just it's own.

Re: Svelte 5 Released

#96
post #14

Exciting, I love Svelte! Does anybody have experience with both Vue and Svelte? It's been a while since I used Vue but it seems like both frameworks have converged quite a bit over the years. With this release I'm particularly curious now: why would somebody pick one over the other?

There is no way around trying yourself. Stop wasting time asking people for their opinions about frameworks and start building your own insights from first hand experience.

Re: Svelte 5 Released

#97
post #74

Earlier quoted context omitted.

SSR always yields surprises! If you don't _need_ it, don't enable it; everything is simpler.

What!? Why would that be?

SSR is one missing pragma away from leaking api keys to clients.

SSR means your web server needs to scale with load on your front page, versus static bundles that can be served almost at infinite scale from a $15/month VPS.

Re: Svelte 5 Released

#100
post #23

What's the preffered way to make simple SPAs using Svelte now? I'm using this +layout.ts with sveltekit: > export const ssr = false; export const prerender = false; But it feels awkward for real SPAs - internal applications that have no need for server side rendering.

SvelteKit is a great way to build a SPA. I think just adding those two lines of config to your project once shouldn't be an issue. If there are any difficulties you'd like to share we'll try to fix them as part of SvelteKit 3. (e.g. this issue which I added to the 3.0 milestone: https://github.com/sveltejs/kit/issues/12580)
Post reply on HN