1. 17
  1.  

  2. 2

    Great work Svelte team! I’ve been excited about Svelte for a while. The blog (that sadly has been idle for a year up until now) and the integrated playground is excellent. But I’ve become so used to statically typed languages elsewhere that writing Javascript feels weird almost. Can’t wait to try this (and Typescript) out finally.

    1. 1

      Has anyone used Svelte and can give a small comparison between this and the other popular frameworks right now? (Vue and React I guess?)

      I’m making a small web interface and I think it could use some… interactivity; I tried with React because that seems like the most popular and the best thing to put in my CV but it’s been confusing so far.

      1. 4

        Svelte code usually needs fewer characters to accomplish the same thing and its output is typically smaller and faster. (not always, and Vue may win some benchmarks nowadays) On the more subjective side of things, I find there’s less abstraction and a simpler mental model for working with components and the DOM. There’s a lot of power and flexibility behind its apparently simple syntax and features - animations in particular are nice coming from React - but it makes some tradeoffs to prefer statically analyzable constructs over unfettered runtime flexibility. (e.g. things like mapping over and introspecting props and slots are unofficial hacky APIs at the moment) In practice I haven’t been hampered but YMMV. Some open issues might fill in these gaps.

        It’s closer than most frameworks to working directly with plain JS/HTML/CSS, and it’s sometimes called an unframework because of how it compiles its components to simple JS with imported helpers, not too different from optimal hand-written vanilla JS, but with modern declarative components. I wrote this fairly comprehensive overview with React and Vue in mind a few months ago.

        I agree React and Vue are both better for your CV. Svelte might stand out for some people.

        The official tutorial walks you through a lot of the basics. An hour or two with it and the examples should give you a good taste for it.

      2. 1

        I’ve been waiting for TypeScript support for a few months now. Glad to see it in! It seems like Sapper is gonna get TypeScript support soon too.