4 ms·
The fact you can easily make yet another To Do list app isn't very useful. If you can't easily make a very simple app then something is seriously wrong with the
by onion2k 7y ago
The fact you can easily make yet another To Do list app isn't very useful. If you can't easily make a very simple app then something is seriously wrong with the framework.
A much more useful question is whether or not a framework makes it easier (or faster, or better, or something) to write a complex app. In the case of Svelte, all the hard stuff (eg state management, sync'ing data from APIs, etc) is outside of the scope framework. That make Svelte much smaller and simpler, but it makes writing a complex app harder (because you need to glue some other libraries together yourself; the framework isn't doing it for you).
- rimliu 7y agoThis is not different from React, which is just a view library.
- myrryr 7y agoExcept it isn't, it's a compiler rather than just a view library. The point is it ain't just a view library, and once you have your own compiler you can get more done.
- rimliu 7y agoMy point was more about the problem it solves not the nature of the tool, i.e. that it does not concern itself with data store or routing.
- cpfohl 7y agoState Management is a first-class part of svelte, check out their `Store` implementation. https://svelte.dev/tutorial/writable-stores https://svelte.dev/tutorial/writable-stores It only took me a few hours to fully appreciate what a tidy solution Svelte's store implementation was. As far as syncing data from APIs: I am pretty sure that it should be out of scope for _any_ view layer. APIs vary widely, and it wouldn't be appropriate for a view tool (Svelte, React, Vue, etc) to have an opinion. It's really up to the developer, and for the most part (and I may have a controversial opinion here?) should be a pretty simple set of wrappers around `fetch`). Where's Vue or React's API consumption tooling?
- hamilton 7y agoFrom experience building more complex apps in Svelte, I can say that this has not been my experience, & doesn't accurately depict React in practice. Three aspects that make it really killer – a really great story for handling app & component state cleanly regardless of complexity, a great style scoping story, and powerful transition / animation primitives that fit neatly into the idiom – has made it easier to build large data apps than I've found with React (which I also use). Another aspect I have really appreciated is that I have substantially fewer dependencies, since there is more included in Svelte than in React. I tend to only use d3 utility functions (format, scales, etc.) & immer (which I pair with svelte stores to get something kind of Redux-y, which is great for other devs jumping into Svelte from React-land). Fewer dependencies means I'm less likely to encounter awful dependency hell. Generally, I feel like every time I see a Svelte thread here, there's a lot of random noise, but it's good to listen to the folks who actually use it. There are situations where it makes sense, and situations where it probably doesn't. The main reason why I might not use it is ecosystem friction – a lot of devs I know would prefer to just use what they know, even if it is painful relative to Svelte & friends.
- mokanfar 7y ago>There are situations where it makes sense, and situations where it probably doesn't. I have been working with svelte for quite some time now, and honestly I can not think of a time where it did not make sense to use it. At its most basic form, its compiles down to vanilla javascript with a small footprint and offers a tidy workspace when working with html/css/es6.