Replies: 1 comment 4 replies
-
You can't really replace this exact store like this because it's a primitive. You can however replace an object store like this export const a = $state({
value: 0,
}); |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am really confused by the documentation. Could you help me understand if I need to wrap the state rune every single time in a function/class and use the getter/setter? Do I need to use
new
keyword to initiate a new instance for every single rune based store? I was able toexport const a=writable(0)
and that is it. Will I be able to use $state rune to declare a store replacement as concise as this? Do I have to go through all the stated procedures above just to use rune to replace store?Than you for your help.
Beta Was this translation helpful? Give feedback.
All reactions