Back to blog
Tech Watch: The 'Runes' of Svelte 5
Sep 29, 2023
2 min read

Tech Watch: The 'Runes' of Svelte 5

Exploring the revolutionary 'runes' feature in Svelte 5, enhancing the distinction between reactive and non-reactive states.

Veille technologique πŸš€: The β€œrunes” of Svelte 5

The ever-evolving web world has given us Svelte, a revolutionary UI framework that transformed JavaScript into a reactive language in 2019. The latest iteration, Svelte 5, introduces a significant new feature: the runes.

πŸ” Focus on runes:

Initially, the introduction of runes might seem like a step back. Instead of simply declaring let count, we now write let count = $state(0). But this evolution is far from regressive.

πŸ’‘ Why runes? They provide a clearer distinction between reactive and non-reactive variables. This addresses growing complexity issues in applications, where it can be challenging to determine which values are reactive. Universality: Runes extend reactivity beyond .svelte files, enabling better encapsulation and reusability of code across components.

Advantages of runes:

  1. Clarity: Eliminates confusion between reactive and non-reactive variables.
  2. Extensibility: Reactivity is no longer confined to .svelte files.
  3. Simplified Refactoring: Clear and well-defined reactivity makes code refactoring easier.

While Svelte 5 is not yet ready for production use, the direction taken with the introduction of runes once again demonstrates its commitment to pushing the boundaries of simplicity and efficiency in web development.

Looking forward to seeing how runes will transform our coding practices with Svelte!

#Svelte5 #Technology #Runes #Innovation