Svelte · Middle · Question 28 of 75
What does flushSync() from svelte do?
- ✓Correct answer: Synchronously applies pending state changes to the DOM, useful in tests and when measuring right after a change
- 2Writes state to
localStorage - 3Forces SSR to finish
Explanation
Svelte batches updates in a microtask. await tick() is the async alternative.