5 ms·
It seems like the overall trend is that people are getting more and more unsatisfied with the current landscape now that a little bit of the sugar high from fir
by preommr 6y ago
It seems like the overall trend is that people are getting more and more unsatisfied with the current landscape now that a little bit of the sugar high from first wave of shiny new tech is starting to fade away.
The jump from "whatever js was in 2014" -> angularjs junk -> react/vue/angular was pretty big.
But now the glamour is gone and we're moving into the phase of actually having to maintain some of the things we built and the wear from bad decisions is starting to show.
-----
Svelte also seems like the cool new kid on the block. Svelte surprises me in how much people fawn over it. I really don't understand the hype since I don't think it's a huge jump forward, and there's also a lot of "misunderstandings" about it in comparison to other frameworks.
Like one thing I've seen a lot is people mention how it requires less code, but it's not that much smaller. It just looks smaller for small test cases where there are like 8 lines of code or because svelte makes stylistic choices that have tradeoffs that aren't immediately obvious. If you take a loot at react/vue, they're not that much bigger for realistic component size.
Anyways, front-end framework discussion is long and muddled and confusing. I wanted to make a point of how svelte people often confuse the engineering/implementation vs the philosophical approach in frameworks. Things like svelte's bundle size being smaller is because other frameworks don't put as much emphasis on it. I was going to say that react is bloated and that preact is much smaller, but looking it up it seems like somehow react is 2.6kb, preact is 4kb, and svelte is 1.5kb. Angular is 62kb. Which proves two points, react/vue can be smaller if it wants, the approach it takes doesn't limit it and that things move so fast that somehow preact makes bigger bundles than react.
- turtlebits 6y agoSvelte is a a breath of fresh air because of its simplicity, not because it's bundle size (which is a bonus). It's especially easy to get up and running and the documentation is great. React/Vue/Angular you have to learn the build system as well as the ins and outs of the framework, and there are too many opinionated ways of getting started.
- preommr 6y agoHow is this complicated: ``` <script src="https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.js"></script> https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.js"></scrip... var app = new Vue({ el: '#app', template: "{{message}}" data: { message: 'Hello Vue!' } }) ``` A lot of the build problems with react/vue also exist with svelte. In fact it's even worst with svelte because it's compiled only (which is it's unique selling point) whereas vue can be used in a much more progressive manner. React is a little bit harder because of jsx, but it's still not that much more complicated. Build-wise, parcel supports jsx/vue files out of the box. Plus React/vue both have cli tools that I don't like and wouldn't recommend, but are super easy to get started with. And this all comes with the giant caveat that react/vue make progress which can lead to confusing versions. Svelte is a lot younger (kind of, it came out a few years back, so idk) so it hasn't had to cross that bridge yet. And even then, there was the confusion with Sapper. I highly doubt that svelte is going to be immune from the fast-paced nature of these frameworks.
- turtlebits 6y agoWhile that works, you won't get very far without having to switch over to a build system, then learn how to configure/use that. Look at VueJS and React installation pages and it's easy to see the problem with modern frameworks. https://v3.vuejs.org/guide/installation.html#release-notes https://v3.vuejs.org/guide/installation.html#release-notes https://reactjs.org/docs/add-react-to-a-website.html https://reactjs.org/docs/add-react-to-a-website.html
- noir_lord 6y agoUsed vue for a few years then new place was svelte, I like it it but not because of the simplicity (or more because the simplicity that comes from it's killer feature), I like it because it's compiled. So a lot of the abstractions that make life pleasant simply go away. The in-browser dev tools (svelte tools) lag far behind vue dev tools but it's newer.
- mmmateo 6y agoI think you’ve misunderstood Svelte’s bundle size. Its bundle size is technically zero since it’s a compiler. React can’t get any smaller because of the approach, not because they don’t want to. That’s why it doesn’t include so much out of the box (eg styling, animation, state management).
- swyx 6y agoif it helps, i wrote down my reasons for adopting Svelte, as a pretty heavily involved React user previously: https://www.swyx.io/svelte-why/ https://www.swyx.io/svelte-why/ TLDR: - it comes with batteries included - mutable syntax is the simplest possible mental model - sugar syntax for very common tasks is a norm, including for state management - docs are fast and good - internals are simple to understand (i can genuinely fork it if i ever disagree with decisions - good luck doing that for react) - and other smaller items.
- rk06 6y ago> react is 2.6kb react is used with react-dom [1] which is a 121kb minified[2] [1] https://www.npmjs.com/package/react-dom https://www.npmjs.com/package/react-dom [2] https://unpkg.com/browse/react-dom@17.0.1/cjs/ https://unpkg.com/browse/react-dom@17.0.1/cjs/
- yawnxyz 6y agoI jumped from Vue to Svelte when I recreated a site that took me a month to build in Vue in just over a weekend in Svelte. Svelte is FAST to build in, as a single dev, because it's so much less opinionated. I can see how that'll turn around to bite me once the code base gets more complicated though