Updating the store #152
Closed
Jakobud
announced in
Announcements
Replies: 2 comments 2 replies
-
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.
1 reply
-
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
Uh oh!
There was an error while loading. Please reload this page.
-
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