Svelte · Senior · Question 8 of 75

What does createSubscriber from svelte/reactivity solve?

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.

Further reading

Problem with a question

Svelte · Senior · question 8

Test yourself

Take the Svelte · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz