You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was learning svelte by reading the interactive tutorial from start to finish. When I got to the readable store part, having used redux, I immediately think:
Nice, I can use writable stores as mini redux stores.
The answer is yes, and that's a HUGE deal, because you can't do it in redux, and that has been drilled to people's heads.
In the current tutorial here and here, the example store is an integer:
exportconstcount=writable(0);
And my initial assumption was "I probably can't do mutate in a store, otherwise the doc wouldn't have used an integer to demo it". Many many others may think like me - being able to mutate feels too good to be true.
So, I suggest adding a demo of an object as writable store. You have no idea how much redux has changed people brain.
(side note: even chatGPT is affected by redux, try asking I have a svelte writable store that is an object, how do I update a slice of it? and see what it says)
The text was updated successfully, but these errors were encountered:
ZYinMD
changed the title
[suggestion] talking about mutation in a writable store that is an object
[suggestion] talk about mutation in a writable store that is an object
Apr 7, 2023
I was learning svelte by reading the interactive tutorial from start to finish. When I got to the readable store part, having used redux, I immediately think:
The answer is yes, and that's a HUGE deal, because you can't do it in redux, and that has been drilled to people's heads.
In the current tutorial here and here, the example store is an integer:
And my initial assumption was "I probably can't do mutate in a store, otherwise the doc wouldn't have used an integer to demo it". Many many others may think like me - being able to mutate feels too good to be true.
So, I suggest adding a demo of an object as writable store. You have no idea how much redux has changed people brain.
(side note: even chatGPT is affected by redux, try asking
I have a svelte writable store that is an object, how do I update a slice of it?
and see what it says)The text was updated successfully, but these errors were encountered: