4 ms·
How is it different and what’s so good about it?
by treggle 7y ago
How is it different and what’s so good about it?
- GoToRO 7y agoFrom what I know it's a compiler, so it check all the things at compile time and not waste time at run time.
- spoiler 7y agoThat's partially true. The other benefit is that there's no vDOM, the way things change is reactive (kinda like in react), but there's no such thing as a no-op change. if you set something to what it was, it would trigger a partial rerender so you have to check before setting. With react you get those checks for free (provided you comply to certain restrictions).
- rmilejczz 7y agoThe main draw is that Svelte apps have no dependencies at runtime, instead it compiles a pure vanilla js bundle that relies on existing web APIs to do updates. This is attractive to a lot of people, me included, but imo Svelte isn’t quite production ready yet (at least for complex apps). It’s great for small projects though and I highly recommend checking it out