Fireship · @fireship

JavaScript framework reinvents itself… Did "runes" just ruin Svelte?

Uploaded October 24, 2024 · Length 4:19

JavaScript framework reinvents itself… Did "runes" just ruin Svelte?

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.

  1. 0:00

    about a year ago I made a tweet that

  2. 0:01

    said the dollar sign in spelt is the

  3. 0:03

    most powerful abstraction in modern

  4. 0:05

    front-end web development usually I'm

  5. 0:07

    not wrong about anything ever but this

  6. 0:09

    tweet ended up aging like a fine milk

  7. 0:11

    because just Weeks Later spelt announced

  8. 0:13

    a brand new feature called runes that

  9. 0:15

    significantly changed the developer

  10. 0:17

    experience by eliminating the dollar

  11. 0:18

    sign Syntax for reactive data and then

  12. 0:21

    just a few days ago this feature became

  13. 0:22

    official with the release of spelt 5 as

  14. 0:24

    an avid user of spelt myself I was

  15. 0:26

    pretty terrified of this feature at

  16. 0:28

    first glance I was one of the few

  17. 0:29

    survivors of the angularjs to angular 2

  18. 0:32

    migration I shot myself in the foot

  19. 0:33

    during the react hooks Revolution and I

  20. 0:35

    lost some good friends during the view

  21. 0:37

    options to composition transition and I

  22. 0:39

    just can't do this anymore man so

  23. 0:40

    maybe I'll just go back to

  24. 0:46

    Wordpress uh never mind spelt it is in

  25. 0:48

    today's video we'll find out what the

  26. 0:50

    hell a rune is and whether or not

  27. 0:51

    they're going to ruin spelt it is

  28. 0:53

    October 24th 2024 and you're watching

  29. 0:55

    the code report most people really liked

  30. 0:57

    runes when they were first announced but

  31. 0:59

    not everybody I was in denial at first

  32. 1:01

    then I got angry then I bargained about

  33. 1:03

    the tradeoffs then came depression and

  34. 1:05

    finally I've come to accept and really

  35. 1:07

    enjoy runes the big question is why

  36. 1:09

    would the most L JavaScript framework

  37. 1:11

    make a risky departure from the features

  38. 1:12

    people love about it like reactive state

  39. 1:14

    with let and reactive side effects with

  40. 1:16

    the dollar sign just look at how much

  41. 1:18

    nicer this code is compared to reactjs

  42. 1:20

    react is even copy and spelt with its

  43. 1:22

    own compiler to make this code not suck

  44. 1:24

    so much the spelt code is lean and

  45. 1:26

    concise but one could argue that it's

  46. 1:28

    almost too clever let looks exact like

  47. 1:30

    regular JavaScript but because spelt

  48. 1:32

    uses a compiler it doesn't actually work

  49. 1:34

    like regular JavaScript under the hood

  50. 1:35

    the compiler does some magic to

  51. 1:37

    automatically update the UI whenever

  52. 1:39

    this value changes another issue is that

  53. 1:41

    this magic only works in a spelt file

  54. 1:43

    and that means it's difficult to share

  55. 1:45

    reactive logic throughout your

  56. 1:46

    application and spelt created an

  57. 1:48

    entirely different API called stores to

  58. 1:50

    address that issue however runes fix

  59. 1:52

    both of these limitations by a making

  60. 1:54

    your code more explicit and B they

  61. 1:56

    create a universal reactivity system

  62. 1:58

    that can be used not only in spel

  63. 1:59

    components but also in plain JavaScript