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

For me, that's icing on the cake. Why I truly like and recommend Svelte is its ergonomics. Paired with Sapper, building a fast website is a breeze and feels like you're just writing plain HTML and (supercharged) JS.


Cool, but how does it help me reason about my code and maintain large projects? It doesn't even support typescript. Sure, the components look okay in isolation, but what about the big picture?


Here is the issue that describes what the Svelte team is doing to add support for TypeScript: https://github.com/sveltejs/svelte/issues/1639


> typescript

I hear that this is something they are looking into adding support for


It doesn't and it won't. Advocates for Svelte seem to prefer it over the complicated (I do not agree) React patterns. Those patterns are there for a reason and help the code stay maintainable and predictable. Not supporting TypeScript is also a big blow.

Small projects / websites = use the DOM

SPAs = use React

Why would you use Svelte for small websites when it requires JS?

All of my "websites" are made w/ pure HTML/CSS/JS and the JS is optional.

All of my "apps" are made w/ React (Web, Electron) & React Native (Windows, iOS, Android)

I'm working on a stack that sets all this up for you so you can get started on deploying for every platform. I already use it in production.

Don't cheat yourself, use React and take advantage of the progress and ecosystem. If you don't need that, then use vanilla.


React doesn't have some intricate patterns. It mostly advocates for a functional-style UI, where you do computation in the render cycle and keep state localized to a component.

Svelte gives you the exact same tools. I've been building React-based applications for years now and have been using Svelte for some projects on the side and in my opinion both are decent tools. Some of the Svelte "sugar" is easily replicated in React, it's just that React doesn't provide those out of the box; on the other hand, Svelte has some "gotchas" that don't appear in React.


What patterns are you talking about? Nothing specific to React, as far as I know, helps with maintaining a large codebase.

Though, perhaps you mean the larger React ecosystem. But still, what patterns are you talking about? TEA/Redux? There's no reason why you can't use the same patterns with Svelte.




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

Search: