Рет қаралды 1,013
Understanding how your framework works under the hood is the best way to write bug-free code, and save hours of pulling your hair out. This is part 2 of a 4-part video series on Svelte 5's runes. Svelte 5 allows for nested reactivity, which makes $deriveds unnecessary in many cases. In this video we address the answer to the question of when it makes sense to use $deriveds. Spoiler: it's not just about saving computation power!
For the visualisation purposes, I created a library/app (link below) that allows visualisation of the signals, reactions, dependency graphs.
Nano Signals Visualiser
github.com/petermakeswebsites...
Me
petermakeswebsites.co.uk
Special thanks to the folks at the Svelte discord and Dominic ( / trueadm ) for clearing things up for me!
0:00 Welcome
0:25 nested reactivity
3:50 $derived not needed
7:15 when to use $derived?
12:30 different cases
16:15 review
17:40 coming up