Introduction
The tick function helps you wait for Svelte to finish updating the screen before running more code. It makes sure your code runs after the page changes are visible.
You want to run code right after the page updates.
You need to measure or change something on the page after Svelte changes it.
You want to wait for animations or transitions to finish before doing more work.