shallowRef in Pinia store accessible via .value property? #1614
Unanswered
robertgirschick
asked this question in
Help and Questions
Replies: 2 comments
-
what processor do you have on your PC? have the same issue that only affected AMD-based machines. |
Beta Was this translation helpful? Give feedback.
0 replies
-
the refs gets unwrapped so it should keep the reactivity. You will have to share more code in order to be able to tell 👀 |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
I have some
shallowRef
state variables which I need to pass along in functions, soshallowReactive
is not an option. When I use local variables, a receiving function can access thevalue
property and mutate it easily:Then in function:
passedAlongState.value = {...}
works fine, it is accessible and still reactive.If I put the
shallowRef
above into a Pinia store, the function doesn't work, because it can't access the state via.value
. Is there a way to getshallowRef
s in a Pinia store back just like "normal" local state, that is accessible via.value
while keeping reactivity?Beta Was this translation helpful? Give feedback.
All reactions