DEV Community

Discussion on: Getting familiar with svelte

Collapse
 
kwiat1990 profile image
Mateusz Kwiatkowski

I come from Vue world and I must admit that I like the syntaxt and the core concepts of the Svelte. Docs are simple, short and include every needed piece of information and in REPL one can find out how to use every single feature (either by looking on a lot of cool examples or by trying it itself). On top of that the size of compiled Svelte app makes it even more amazing.

I work currently with Sapper and frome time to time I miss some Vue features:.

  • dynamic HTML elements - in Vue a dynamic component can be either a Vue component or just ordinary HTML tag, while in Svelte only components are supported and therefore in order to set HTML tags dynamically one must use if/else block in template. The good news is a PR in Svelte repository is waiting for a merge.
  • transition modes - "out-in" comes in handy and in Svelte it requires some extra code.
  • default router and to know it my link is currently active (although I like the simplicity of the current routing in Sapper and the check if the route is active can be achieved with some custom code as well).
Collapse
 
kalashin1 profile image
Kinanee Samson

Try using svelte-router-spa, it has some cool features

Collapse
 
kwiat1990 profile image
Mateusz Kwiatkowski

It won't work as I use Sapper, which handles routing on its own - more or less like Gridsome or Nuxt (although Nuxt supports not file-based routing as well).

Collapse
 
kamo profile image
KAIDI

There is svelte-kit project in development it may answer your questions, sapper is a dead project it will never have new features

Collapse
 
kwiat1990 profile image
Mateusz Kwiatkowski

In the meantime there is no other option as to start with Sapper and then to migrate. I hope it won't be complicated.

Thread Thread
 
kamo profile image
KAIDI

Svelte kit developers say that the migration from sapper won’t be complicated