Svelte · Middle · Question 9 of 75

Why doesn't items.set(k, v) update the UI when items is a plain Map in $state?

Explanation

svelte/reactivity also has SvelteSet, SvelteDate, SvelteURL, SvelteURLSearchParams and MediaQuery. Their values aren't made deeply reactive.

Further reading

Problem with a question

Svelte · Middle · question 9

Test yourself

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

Take this quiz