vuejs / Discussion

Vue.js discussion
166 stars 17 forks source link

Third Party Libraries - Make non reactive? #1318

Closed seanlandsman closed 6 years ago

seanlandsman commented 6 years ago

Is it possible to use a third party library and somehow make it not reactive? In other words I don't want vue to watch it at all.

My use case is I have a library that will created (and destroy) items many times during its use and Vue is (indirectly) creating a larger than necessary memory footprint as it's watching all data created within the library.

I can't use Object.freeze or similar of course as the library is not in my control. I also can't use the library in created for example as I require this.$el to pass into the library.

What I'm after is something like Angular offers where you can do something "outside" of the angular context.

thanks