First off, I know its bad, if its Vue controlled, then you should control the DOM using Vue. BUT, real life situations are rarely ideal, and in this case, we are migrating an app written in backbone and jQuery, slowly to Vue.

I'm integrating Vue (3) into the existing app, and have Vue control the header, side bar, and creating of main content div, but then the existing app is currently using jQuery to change views and control everything within that content div element. There's tons of jQuery widgets too in the meantime, which we cant simply convert quickly.

Is that ok? Its not great obviously, but can I allow a blackbox situation in there? I will post as new question if I have to, but thought I would ask as related.

I do understand that Vue basically has no control over things within that div, as it doesnt know about it, but would that be ok for now? Can't think of a better way.

I'm already having to do several createApp situations for injecting Vue components into areas within that blackbox, as it seems impossible to do:

Vue root dom (#app)
    -> jQuery/Backbone (#app .contentDiv)
        -> Vue component like a datepicker (.contentDiv. someForm .datePicker)

I'm happy with temporarily doing things that are not GOOD, but not going to be BAD for the operation of Vue. The end goal over the next few months/years is to be fully Vue ofcourse.

0

There are 0 best solutions below