DEV Community

Cover image for 10 Reasons Why I Recommend Svelte To Every New Web Developer

10 Reasons Why I Recommend Svelte To Every New Web Developer

Markus Hatvan on November 11, 2020

Although the initial release of Svelte was back in November 2016, it's still more of an underdog amongst the JavaScript front end frameworks and ju...
Collapse
 
ovchinnikovdev profile image
Konstantin

But keep in mind that there are not so many job vacancies for Svelte Frontend developers. Mostly all of them are React/Vue/Angular

Collapse
 
joshuawoodsdev profile image
JoshuaWoods

Yes but honestly as a newbie your looking at least a extra year to learn enough JS and React to be able to do a job. This is good for newbies, and I really think this will catch on big time. I'm a newbie and I was like WOW this just makes since. React seems over engineered now. Just too much to write.

Collapse
 
drazik profile image
drazik

The global philosophy and the bundle size / performances are great. I'll have to try it. The only thing that doesn't feel right for me is this template syntax that I'll have to learn, where React is just javascript (I see you, wanting to tell me "what about learning jsx?". It's not the same thing as a whole new templating language at all).

Collapse
 
madza profile image
Madza

Working with Svelte feels like combining the good old HTML, CSS, JS approach, while still using components. Also, it's concise, intuitive, lightweight a fast 👍
Excited to see where it will be in an upcomming years 😉

Collapse
 
joshuawoodsdev profile image
JoshuaWoods

Bridgetown takes that same approach

Collapse
 
urielbitton profile image
Uriel Bitton • Edited

I've been contemplating for months now to start learning svelte or not, to give it a chance or not. And the things that are holding me back the most are:

  1. Context API - does svelte offer a similar solution to manage state across the app, i CANNOT live without the context api its insanely useful.
  2. Inline html conditional rendering - i like this, saves a lot of code
  3. CSS-in-JS does svelte let you use it?

(I've been using react for 2.5 years now, its very hard to go to anything else lol)

Collapse
 
mhatvan profile image
Markus Hatvan

1) I described state management as 4th point, you can find some more involved examples online but its super simple to use!
3) Have never used CSS-in-JS but this should answer your question: svelte.dev/blog/svelte-css-in-js

Collapse
 
tvanc profile image
Travis Van Couvering

Svelte has a context API but tbh I don't find myself using it very often. YMMV.

svelte.dev/docs#setContext

Collapse
 
alfredosalzillo profile image
Alfredo Salzillo

I don't think this is elegant.

Collapse
 
mhatvan profile image
Markus Hatvan

Can you give an explanation why?

Collapse
 
alfredosalzillo profile image
Alfredo Salzillo

Because:

  1. Remember me of struts, PHP templates and so many others like this
  2. There is a lot of new syntax to learn
  3. It's not new, not innovative and not simple
  4. There is no order in the way the cose is written and the logic is
  5. This reactivity declaration make me regret Angular (never thought was possible)
Collapse
 
kwiat1990 profile image
Mateusz Kwiatkowski

So far I have heard nothing negative about Svelte. It seems to be this wonder tool that makes developers a lot of fun while they are working with it.

Collapse
 
kalashin1 profile image
Kinanee Samson

I am learning sveltejs and its incredibly simple.. I think I'll take my course more serious

Collapse
 
arnu515 profile image
arnu515

I've fallen in love with Svelte so much that I personally recommend it, especially to beginners, more than React, which used to be my deity before.

Collapse
 
mhatvan profile image
Markus Hatvan

Yeah, very true!
The newly announced development of SvelteKit might help with the adoption of the framework. svelte.dev/blog/whats-the-deal-wit...

Collapse
 
seanmclem profile image
Seanmclem • Edited

9, Shorthand attributes for passing props, the child component doesn't seem to use the prop

Collapse
 
mhatvan profile image
Markus Hatvan

Good catch, I think I was mixing up two examples that I wrote!
I updated the gist to make more sense, thanks a lot Sean ;)