Fireship · @fireship
JavaScript framework reinvents itself… Did "runes" just ruin Svelte?
Uploaded October 24, 2024 · Length 4:19
Summary
Fireship reviews the new 'runes' feature in Svelte 5, discussing its impact on the framework and whether it 'ruins' Svelte.
- svelte
- javascript
- reactivity
- runes
- svelte 5
- react
- angular
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
about a year ago I made a tweet that
- 0:01
said the dollar sign in spelt is the
- 0:03
most powerful abstraction in modern
- 0:05
front-end web development usually I'm
- 0:07
not wrong about anything ever but this
- 0:09
tweet ended up aging like a fine milk
- 0:11
because just Weeks Later spelt announced
- 0:13
a brand new feature called runes that
- 0:15
significantly changed the developer
- 0:17
experience by eliminating the dollar
- 0:18
sign Syntax for reactive data and then
- 0:21
just a few days ago this feature became
- 0:22
official with the release of spelt 5 as
- 0:24
an avid user of spelt myself I was
- 0:26
pretty terrified of this feature at
- 0:28
first glance I was one of the few
- 0:29
survivors of the angularjs to angular 2
- 0:32
migration I shot myself in the foot
- 0:33
during the react hooks Revolution and I
- 0:35
lost some good friends during the view
- 0:37
options to composition transition and I
- 0:39
just can't do this anymore man so
- 0:40
maybe I'll just go back to
- 0:46
Wordpress uh never mind spelt it is in
- 0:48
today's video we'll find out what the
- 0:50
hell a rune is and whether or not
- 0:51
they're going to ruin spelt it is
- 0:53
October 24th 2024 and you're watching
- 0:55
the code report most people really liked
- 0:57
runes when they were first announced but
- 0:59
not everybody I was in denial at first
- 1:01
then I got angry then I bargained about
- 1:03
the tradeoffs then came depression and
- 1:05
finally I've come to accept and really
- 1:07
enjoy runes the big question is why
- 1:09
would the most L JavaScript framework
- 1:11
make a risky departure from the features
- 1:12
people love about it like reactive state
- 1:14
with let and reactive side effects with
- 1:16
the dollar sign just look at how much
- 1:18
nicer this code is compared to reactjs
- 1:20
react is even copy and spelt with its
- 1:22
own compiler to make this code not suck
- 1:24
so much the spelt code is lean and
- 1:26
concise but one could argue that it's
- 1:28
almost too clever let looks exact like
- 1:30
regular JavaScript but because spelt
- 1:32
uses a compiler it doesn't actually work
- 1:34
like regular JavaScript under the hood
- 1:35
the compiler does some magic to
- 1:37
automatically update the UI whenever
- 1:39
this value changes another issue is that
- 1:41
this magic only works in a spelt file
- 1:43
and that means it's difficult to share
- 1:45
reactive logic throughout your
- 1:46
application and spelt created an
- 1:48
entirely different API called stores to
- 1:50
address that issue however runes fix
- 1:52
both of these limitations by a making
- 1:54
your code more explicit and B they
- 1:56
create a universal reactivity system
- 1:58
that can be used not only in spel
- 1:59
components but also in plain JavaScript


