How to declare a non reactive variable with object syntax #1220
Answered
by
posva
Rolanddoda
asked this question in
Help and Questions
-
With function syntax, you can do const useMyStore = defineStore('myStore', () => {
const nonReactive = getValueFromSomeFunction()
return {
nonReactive
}
}) Is there any way to do this with object syntax?
|
Beta Was this translation helpful? Give feedback.
Answered by
posva
Aug 9, 2022
Replies: 1 comment
-
Use markRaw() state: () => ({ nonReactive: markRaw(...) }) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
posva
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use markRaw()