2 ms·
Which is perfectly fine
by mister_hn 7y ago
Which is perfectly fine
- rat9988 7y agoIt is not, I can already do that directly with the DOM. It's a huge asset, but not enough. Ease of use, development velocity or something along these lines should be mentioned.
- felideon 7y agoFor 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.
- choward 7y agoCool, 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?
- s_y_n_t_a_x 7y agoIt 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.
- felideon 7y agoWhat 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.
- emerongi 7y agoReact 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.
- lhorie 7y ago> typescript I hear that this is something they are looking into adding support for
- mvolkmann 7y agoHere is the issue that describes what the Svelte team is doing to add support for TypeScript: https://github.com/sveltejs/svelte/issues/1639 https://github.com/sveltejs/svelte/issues/1639
- paulddraper 7y agoIt's perfectly fine if your most pressing issue with large bundle sizes/slow performance. If your most pressing issue is removing bugs from managing state, you will pass it by.
- ummonk 7y agoRight, and if your pressing issue is large bundle sizes/slow performance, you'd probably be using Preact.
- mvolkmann 7y agoIf your most pressing issue is making managing state easier, you should run to Svelte! Take a look at how Svelte supports "stores", "context", and state within a component. Those are so good that I predict nobody will ever feel the need to write a state management library for Svelte. It's already very easy!