Live data from Hacker News

Ask HN: What are your experiences with Svelte (JS framework)

news.ycombinator.com

51–60 of 105 posts

Re: Ask HN: What are your experiences with Svelte (JS framework)

#51
I evaluated Sapper and Svelte previously for a side project. The tutorial and tooling was great. Unfortunately, the hacks needed to add typescript made it a nonstarter. I look forward to TS becoming a first class citizen like what happened with Next.js (the solution I chose in the end).

Re: Ask HN: What are your experiences with Svelte (JS framework)

#52
Love the performance, love the component model, and honestly the tooling is starting to get really, really good. I think 2020 is really going to be Svelte's year.

I'd also note that Svelte is the least framework-y of all the frameworks, which is why I think it's perfect for beginners.

Re: Ask HN: What are your experiences with Svelte (JS framework)

#53
post #49

I've used it in a small project. It has so many great things but I don't love some of the dev ergonomics. My first big problem is that you can't have more than one component per file, much like single file components in Vue. If you're working on a component that has many sub-components it becomes very tedious to switch around files. In Vue instead of creating new small components when using SFC I tended to complicate…

A Svelte store can hold a deeply nested object. It's up to you how fine-grained you want the stores to be, anywhere from one store per value to one store for the entire application. I think a middle ground is best.

Re: Ask HN: What are your experiences with Svelte (JS framework)

#54

I've posted before about my experience with svelte ( https://news.ycombinator.com/item?id=20338175 ). Will try to reiterate a few of them here. I've been using it internally at my current job to great effect since March, after I convinced my manager to let me try it on a one-off project. That small project has led to us using it for other bigger projects, again pretty successfully. tl;dr – I probably wouldn't choose…

> the time to first meaningful render in svelte is substantially, substantially lower than it is in React, and you face none of the drawbacks of using the React starter stuff (ie ejecting isn't a thing). This may seem like a weird metric, but I think it's pretty vital.

I think this is the most important metric of any JS project.

We rarely need to update thousands of dom elements per second, but all JS projects need to download and start running ASAP. Specially on mobile.

This talk was pretty enlightening: https://vimeo.com/364402896

Re: Ask HN: What are your experiences with Svelte (JS framework)

#55
Yes! I have been using Svelte on Budibase (https://github.com/Budibase/budibase) for the past year. Although Budibase is not in production yet, its a serious project that we plan to release in the next few months.

I have used React and many others over the years - currently using react in my day job.

I really like Svelte. I would happily choose it over React for any of my own projects. I find Svelte simple and intuitive - it is the easiest framework i've ever used, to get to grips with.

The tooling, resources and no. of 3rd party libraries are way smaller than the bigger hitters, like React - understandably as it is much younger. I have not found this to be an issue at all - theres a VS code extension and a great community and website/docs/examples.

It will obviously be more difficult to find devs with Svelte skills, if you are hiring... but its so easy to pick up, i dont think thats a problem.

Re: Ask HN: What are your experiences with Svelte (JS framework)

#56

Looks neat but I don't know why you'd choose it over one of the big 3 (React/Vue/Angular). Seems to have far less community support and 3rd party libraries available. If you're a business it's probably harder to hire for too as it's less well-known.

Yes, but it is so much easier to implement Svelte components than components in Angular, React, or Vue. So much less code to write. No need to write classes, just plain functions, so no need for "this". Automatically scoped CSS. Very easy state management, both inside components and shared between components. And Sapper adds even more cool things like server-side rendering and code splitting with no configuration required.

Re: Ask HN: What are your experiences with Svelte (JS framework)

#57

I've used it for a small side project. It's fun to build in, but the testing story is almost non-existent.

The testing story just hasn't been well documented yet in the official docs. I have documented both unit and end-to-end testing with Svelte here: https://objectcomputing.com/resources/publications/sett/july...

Re: Ask HN: What are your experiences with Svelte (JS framework)

#58
post #8

It's cute but I can't recommend it for a project with more than one developer. Lack of TypeScript support and the hacky component model (specifically, Svelte's equivalent of React props) are the two big deal-breakers.

I understand if you really want TypeScript support, but why do you feel the component model is hacky? I find it beautifully simple.

Re: Ask HN: What are your experiences with Svelte (JS framework)

#59

I've posted before about my experience with svelte ( https://news.ycombinator.com/item?id=20338175 ). Will try to reiterate a few of them here. I've been using it internally at my current job to great effect since March, after I convinced my manager to let me try it on a one-off project. That small project has led to us using it for other bigger projects, again pretty successfully. tl;dr – I probably wouldn't choose…

Testing for Svelte does exist! See my writeup on it here: https://objectcomputing.com/resources/publications/sett/july...

Re: Ask HN: What are your experiences with Svelte (JS framework)

#60
post #49

I've used it in a small project. It has so many great things but I don't love some of the dev ergonomics. My first big problem is that you can't have more than one component per file, much like single file components in Vue. If you're working on a component that has many sub-components it becomes very tedious to switch around files. In Vue instead of creating new small components when using SFC I tended to complicate…

A Svelte store can hold a deeply nested object. It's up to you how fine-grained you want the stores to be, anywhere from one store per value to one store for the entire application. I think a middle ground is best.

Yes you can, I didn't say otherwise. (I did criticize Vue though)

My point is that Svelte stores are tedious and ironically seem to go against Svelte's filosophy of lean code.

Here are the docs if anyone wants to take a look:

https://github.com/sveltejs/rfcs/blob/master/text/0002-react...

Post reply on HN