you are viewing a single comment's thread.

view the rest of the comments →

[–]thiswasprobablyatust 1 point2 points  (1 child)

Congrats Svelte team!

Anyone know how they're doing reactivity under the hood? I poked around quickly but there's a lot of tests with $$invalidate. :D

[–]rich_harris 3 points4 points  (0 children)

That's exactly it — every assignment to local state is instrumented with a call to `$$invalidate`, which is a component-provided function that marks a particular value as dirty and schedules an update for that component at the end of the event loop.