Svelte · Senior · Question 8 of 75
What does createSubscriber from svelte/reactivity solve?
- ✓Correct answer: Integrating external event sources (like
matchMediaor a WebSocket) so they subscribe only while something reactive reads them - 2Subscribing to SvelteKit routes
- 3Creating stores from runes
Explanation
It's how MediaQuery is built: the listener is attached when the value is read in an effect and removed when no effects depend on it.