|
|
|
|
|
by andraaspar
3168 days ago
|
|
I have had success combining old jQuery based components with a Mithril based UI (Mithril is similar to Vue, but simpler). But this only worked because I defined clear boundaries between areas managed by Mithril and areas managed by jQuery. Nesting such areas was possible. It was possible to make them both notify the other when they were about to remove a nested area. Deleting an element created by the other framework however is never a good idea. They can manage their own event handlers and metadata only themselves. Instead, you need to ask the other framework to detach itself. You can use jQuery's special events to detect elements about to be removed from the DOM [0]. Mithril lets you define an onremove lifecycle callback on any component. From there, it is cakewalk. [0] https://stackoverflow.com/a/10172676/2492826 |
|