Svelte · Senior · Question 18 of 75
What does $state.eager do in async Svelte?
<a href="/about" aria-current={$state.eager(pathname) === "/about" ? "page" : null}>About</a>- ✓Correct answer: Shows the new value immediately even while synchronized async updates are pending, for instant feedback
- 2Loads state before hydration
- 3Disables proxying
Explanation
Use it sparingly, only for feedback to user actions; normally letting Svelte coordinate updates gives a better result.