Svelte reactive declarations and "tick" synch'ing
Channel: SpinSpire
Date: 2020-04-16

Shows what reactive declarations (reactivity in JavaScript) are in Svelte, how reactive updates are asynchronous, and how "await tick()" helps synchronize with them.

Visit https://spinspire.com/ for more.

TOC/Index
00:00 intro & overview
00:50 issue 1: re-running JS code as opposed to DOM re-updating on state changes
03:58 solution 1: reactive declaration makes JS code reactive
05:17 issue 2: reactive updates (in DOM and JS) are async; how to synchronize?
07:40 solution 2: synchronize using "await tick()" to wait for reactive update to finish
09:34 recap & summary