Ask HN: JavaScript framework that plays nice with bootstrap and jquery
1 points| rob001 | 8 years ago
I've worked with angular and i really like the data-driven approach, though angular doesn't play nice with jquery and you need another library on top of it to work with bootstrap, which is apparently feature incomplete. I've looked at vuejs, and because of the virtual DOM, it doesn't go well with libraries that manipulate the real DOM directly. The solution to this is to get modified vue-friendly versions of libraries, which is a road im not keen to go down. React seems like it has similar problems.
Is there any js framework that plays nice with bootstrap and jquery and would be better to work with than pure jquery?
andraaspar|8 years ago
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
daleholborow|8 years ago