Updating the store #152
Closed
Jakobud
announced in
Announcements
Replies: 2 comments 1 reply
-
Svelte's writable stores come with an You can mutate state like this: preferences.update(state => {
return {...state, theme: 'light' }
}) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks I didn't see the discussions |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Looking at the example
How could I go about changing the
theme
value? What is the syntax?Really just kinda not clear from your documentation examples. You just say
preferences.set(...) // set value
but what is that? What value am I setting? Where do I put in the key for the object I want to change?Beta Was this translation helpful? Give feedback.
All reactions