Svelte · Junior · Question 38 of 76
What does tick() return?
- ✓Correct answer: A promise that resolves after pending state changes are applied to the DOM
- 2The current frame number
- 3A timer id
Explanation
await tick() is useful when you need to read the updated DOM right after changing state, for example to move focus.