Skip to content

Opting out from proxying globally #13040

Discussion options

You must be logged in to vote

If the types are using classes then you might be able to use markRaw on the prototype:

class Example {}

markRaw(Example.prototype)

That does seem to work in the Playground.

I'm not aware of a hook or mechanism that you can use to tell Vue not to add proxies to specific types, other than markRaw.

The suggestion to use reactivity transforms seems unrelated to your question. Reactivity transforms were for allowing refs to be used without having to write .value explicitly, they didn't remove proxies.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by azygis
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants