Svelte

is it time to jump on the hypetrain?




Konrad Trzciński


So, what about the hype?

Stackoverflow most loved web framework 2022

State of JS 2021

Why do we need hype?

Ecosystem!

What exactly is Svelte?

Frontend component framework

Component frameworks?

            
            
            
            
						
				
          
          
          
          
          
          
            
          
            

DX++😁

But at what cost?🤔

UX--😥

            
          
            
          
            
          

The magical disappearing framework


Keshav Kumaresan - React vs. Svelte: The War Between Virtual and Real DOM

Keshav Kumaresan - React vs. Svelte: The War Between Virtual and Real DOM

Keshav Kumaresan - React vs. Svelte: The War Between Virtual and Real DOM

Jacek Schae - A RealWorld Comparison of Front-End Frameworks 2020

Jacek Schae - A RealWorld Comparison of Front-End Frameworks 2020

Jacek Schae - A RealWorld Comparison of Front-End Frameworks 2020

Jacek Schae - A RealWorld Comparison of Front-End Frameworks 2020

Jacek Schae - A RealWorld Comparison of Front-End Frameworks 2020

Personal experience

Svelte has shallow learning curve

Close to native JS with little to no API = less boilerplate

Passing props

              
              

Using state

              
              

Two way binding

              
              

Reactive values

              
              

Around 40% less code generated vs React


Jacek Schae - A RealWorld Comparison of Front-End Frameworks 2020

Jacek Schae - A RealWorld Comparison of Front-End Frameworks 2020
Industry Average: "about 15 - 50 errors per 1000 lines of delivered code."
Microsoft Applications: "about 10 - 20 defects per 1000 lines of code during in-house testing

No hard to grasp concepts for beginners

Harder to introduce performance issues

Svelte was written with performance in mind

Internal state management through stores

No need to introduce tools like redux

            
          
            
          

Drawbacks

  • Young age
  • Quite barebones
  • Shipping size might get bigger in large applications

Where to start

Summary

  • Great DX
  • Better performance
  • Ease to introduce less experienced developers
  • Worth considering especially in smaller projects

DEMO 🤓

Thank you for your attention!

github.com/szuvi/svelte

npm