Live data from Hacker News

Svelte 4

svelte.dev

91–100 of 227 posts

Re: Svelte 4

#91
post #87

Earlier quoted context omitted.

JS frameworks are like coffee, some people like them milky and full of sugar, some people like them like them lean and black, some are obsessed with making the "worlds best coffee" at home every morning, and some drink whatever brown water comes out of a vending machine. We all like our coffee different, just as we all have favourite features and designs of frameworks. There is no correct, or best, framework, only pe…

Thank you ChatGPT

As someone dyslexic I'm not sure how I feel being compared to ChatGPT... it has better grammar and spelling then me...

Re: Svelte 4

#92
Curious as to people’s experience with Svelte (or SvelteKit) for making so-called “native” apps via Electron/Taurus/etc?

(I believe the new 1Password app is powered by Svelte.)

Re: Svelte 4

#93

This is odd timing with Rich Harris just releasing a course on Svelte v3 on Frontend Masters (June 12th 2023). https://frontendmasters.com/courses/svelte-v2/ From the migration there does appear to be some breaking changes, don't know how that aligns with the course which I planned to take. His old course was good as well, but that relied on Sapper.

The breaking changes aren't really gamechanging stuff, just cleaning up baggage in preparation for Svelte 4.x and Svelte 5. The course would still be fully applicable

Re: Svelte 4

#94
post #4

> Svelte 4 reduces the Svelte package size by nearly 75% (10.6 MB down to 2.8 MB), which means less waiting on npm install. This improvement will be especially noticeable for users who are loading our interactive learning experience on learn.svelte.dev for the first time, users of the Svelte REPL, and users with limited connectivity. The majority of the remaining package size is eslint support, which necessitates dis…

Speaking about size reduction, I once had a client who want me to update his product as it became extremely slow and buggy. The product was an MS Word Add-In that was run on an MS Surface which takes shots using webcam and insert them into the active document, it was built in .Net and the previous developer used, as I recall, OpenCV library to take the shots. The installation binary was around 300MB! And, to add insult to injury, both x86 & x64 of OpenCV were included in binary which made the final binary more than 600MB. I then used a tiny lib in C# to take webcam shots and rebuild the entire solution from scratch which generated a binary of around 1MB. The client had some concerns and suspicions about my delivery but once he tried it in a clean Surface, he realized what I did. It was like magic for him but not for me. I was happy because I made him happy :)

Re: Svelte 4

#95
post #60

I'm curious what peoples' experiences have been using modern react vs svelte vs whatever else is popular these days. I used react a while back for a dashboard mockup and was pretty happy with it. Something about svelte being a superset of standard html/js/css that gets compiled bothers me. I realize that the same can be said about typescript/tsx but I feel like in can trust it more... Maybe it's a maturity thing? Or…

I really do like TSX (react + typescript) for the exact things: Functional Components & Hooks - which are basically functional (albeit impure) building blocks for UI things and interactions. Sure, there goes on a lot behind the scenes and so on, but these two things is for me like "perfect" for composing UIs out of reusable building blocks.

But I really hate how react does not have a "blessed"/"official" router or state management, and a lot of "innovation" in this space simply looks like fashion waves nowadays, often reinventing the wheel, and are getting unpopular again over time.

I personally do use Meteor again these days to have real fullstack stuff easily, which has built-in state management (client-only collections work extremely well for state) when things become more complex than a few useState things. Also SSR "just works" with this, since a useTracker (from meteor) is executed during SSR cycle (as opposed to useEffect API calls), including rehydration with a fast-render package.

This absolutely is crucial for my projects, or else stuff like proper SEO is simply a pain in the ass. I would even pay money for react to have kind of renderToString on the server that simply BLOCKS (or awaits) during SSR so that the initial HTML contains fetched data. The discussion about react server components at this point is just comically absurd for me, as if they really want to make the simple SSR requirement as complex as possible for no reason, other than maybe force users into Nextjs so they can make more business from magically working hosting.

Re: Svelte 4

#96
post #94
post #4

> Svelte 4 reduces the Svelte package size by nearly 75% (10.6 MB down to 2.8 MB), which means less waiting on npm install. This improvement will be especially noticeable for users who are loading our interactive learning experience on learn.svelte.dev for the first time, users of the Svelte REPL, and users with limited connectivity. The majority of the remaining package size is eslint support, which necessitates dis…

Speaking about size reduction, I once had a client who want me to update his product as it became extremely slow and buggy. The product was an MS Word Add-In that was run on an MS Surface which takes shots using webcam and insert them into the active document, it was built in .Net and the previous developer used, as I recall, OpenCV library to take the shots. The installation binary was around 300MB! And, to add insu…

> clean Surface

Eh, that's not a fair comparison, Windows bundles the .NET standard libraries and runtime.

Re: Svelte 4

#97

Earlier quoted context omitted.

yea but this more like install react more than nextjs, nextjs do to much magic to be comparable 600 mb is insane anyway but is important to be clear then we are comparing different things

Would SvelteKit be a better comparison then?

Yes. Svelte:React::SvelteKit:NextJS

Re: Svelte 4

#98

Time for a very naive question. As somebody looking for a more effcient (less re-rendering) and nicer DX (template based, stuff like exit animations) alternative to React, what actually makes Svelte measurably better than Vue? On first (and very naive) look the two seem pretty similar, with the biggest difference being that Vue seems to have the much bigger ecosystem and more mature tooling (I keep hearing about Svel…

The performance difference is huge. A few years ago I launched an interactive consumer app on very resource constrained devices that would have been impossible with React or Vue (I empirically tested both). Think dual or quad core 1Ghz arm processors with zero GPU acceleration running electron.

The only optimization I had to implement was virtualization when showing hundreds of off screen images (an optimization I would have had to implement regardless of framework).

Re: Svelte 4

#99
hope it adds a client side router, and provides a true SPA mode(not the sveltekit stuff), before then, no plan to use svelte again as my use cases is 100% SPA with 0% SSR, absolutely nothing with SSR.

Re: Svelte 4

#100
post #60

I'm curious what peoples' experiences have been using modern react vs svelte vs whatever else is popular these days. I used react a while back for a dashboard mockup and was pretty happy with it. Something about svelte being a superset of standard html/js/css that gets compiled bothers me. I realize that the same can be said about typescript/tsx but I feel like in can trust it more... Maybe it's a maturity thing? Or…

I'm a big fan of svelte vs. other frameworks. The closeness to vanilla js and natural coexistence with html+css makes it so smooth to work with and you feel productive right away. Recently built this with it: https://meoweler.com At least for small projects like this, it's perfect. For something larger/complex I'd be a bit more weary.

That website is AWESOME. I also found your dribble. Your work is absolutely stunning and inspiring.
Post reply on HN