Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I went through the svelte examples and I was exited until I reached the If block example:

    {#if user.loggedIn}
      <button on:click={toggle}>
        Log out
      </button>
    {/if}
To me such template language is a huge step back from JSX. JSX is JavaScript, thus you get the full power of the language (JS/TS) with the full support from your editor (type checking, auto-completion, etc.).



I hate template languages myself. But in Svelte’s defence, their template language in version 3 seems to be well-designed and streamlined.

It doesn’t have the ad-hoc nature of “oh crap we forgot to add if-then-else” of Angular or “let’s create half-a-dozen incompatible javascript-like DSLs” of Vue.


Yeah I think I basically agree. Being able to simply write idiomatic javascript to compose elements is just so awesome.

Though I would assume Editor support of Svelte can/is being built.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: