Wrapping a function inside a reactive object #10895
Unanswered
guysagy
asked this question in
Help/Questions
Replies: 1 comment 2 replies
-
I don't think there will be any problem. If you are still worried, you can try: import { reactive, markRaw } from 'vue';
const data = reactive({
v: 1,
func: markRaw(function () {
console.log(this. v)
})
})
|
Beta Was this translation helpful? Give feedback.
2 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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi.
I would like to get opinions on creating a reactive object with both primitives and functions, something like this :
... in a web application of course. This being a very simplistic code structure for demo here.
Any opinions on this reactive() usage pattern ?
Will putting functions in a reactive object cause any issues in an application ?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions