DEV Community 👩‍💻👨‍💻

Eric The Coder
Eric The Coder

Posted on

Please don't try Svelte.js first!

Lately I started learning React.js I knew the base of Vue.js and I wanted for fun to discover another framework.

My experience with React has not been the most positive. Being used to Vue concepts, I find React more difficult to master. It's personal but it's not the greatest love.

Speaking of love, about two weeks ago I read an article here on dev.to :-) about Svelte. I had already heard of Svelte but it was a little while ago and I didn't know much.

Between two React training sessions, I decided to take a look at Svelte ... Just to see ...

I did the basic tutorial. Which by the way is excellent (https://svelte.dev/tutorial/basics) and I immediately fell in love with it.

It's amazing how easy and enjoyable it is to work with Svelte. And to understand it well I recommend doing a little Vue and React before. By comparing these frameworks you can quickly appreciate the advantages of Svelte. No kidding, I strongly recommend not to start in Svelte, it will spoil the surprise.

Thanks to the dev.to community for enlightening me on the subject.

If there are Svelte fans please leave me a comment and we can start sharing our littles Svelte story.

Top comments (5)

Collapse
 
jfbrennan profile image
Jordan Brennan • Edited on

Svelte, Vue, and Riot are great! You gotta try Riot.js if you haven't! So clean:

<my-component>
  <button onclick="{add}">Add</button>
  <ul>
    <li each="{ item in items }">{item}</li>
  </ul>

  <script>
    export default {
      items: [1, 2, 3],
      add(e) {
        const next = this.items[this.items.length - 1] + 1;
        this.items.push(next)
      }
    }
  </script>
</my-component>
Enter fullscreen mode Exit fullscreen mode

And you'd use that component like this:

<h1>Trying Riot</h1>
<my-component></my-component>
Enter fullscreen mode Exit fullscreen mode
Collapse
 
khaki32 profile image
khaki

Never tried Riot, but from this code the only thing I immediately dislike is the use of kebab-case instead of PascalCsae for components. Otherwise looks fine, I like that it's more explicit compared to Svelte.

Collapse
 
ericchapman profile image
Eric The Coder

This morning I got up and made the decision that I will probably go and develop my next web app im Svelte. I will continue my learning path and if all goes well I will try Svelte in a real project very soon!

Collapse
 
gevera profile image
Denis Donici

Svelte is awesome. Can't wait for Svelte v4, it will be even better!

Collapse
 
jwp profile image
John Peters

Yes it's a keeper.

We want your help! Become a Tag Moderator.
Fill out this survey and help us moderate our community by becoming a tag moderator here at DEV.