Recommendations for using multiple Javascript libraries on the same page?

I thought a lot about which library would be better, but in any library "X" there will be no specific function from the library "Y".

What are people's thoughts on using multiple JavaScript libraries at the same time?

+3
source share
3 answers

Simply put, do not do this. You will have headaches:

  • Inconsistent code in your application ($ ('element') vs $ ('# element'))
  • Possible conflicting libraries (Date.prototype.toJSON () is often defined in libs)
  • Additional overhead for your users to download, which degrades the user's experience.
  • , , ,
  • , .

, . , , , .

+7

javascript , javascript.

:

  • JQuery
  • KendoUI
  • Backbone.js
  • knockout.js
  • require.js
  • underscore.js
  • modernizer.js

javascript , .

, .

, , .

+2

Use jQuery and its plugins. You will never have this feature :). I don’t see anything wrong with using several libraries, but it's nice to stay within a single structure ... it simplifies working with the code and managing the code base a bit.

+1
source

Source: https://habr.com/ru/post/1718942/


All Articles