I didn't know about Element.before, Element.replaceWith and Node.contains… despite them being around for quite some time! Would have saved me from writing some clunkier code than necessary.
We may need a "You might not need React" website now.
Most of the examples need at least 5x the code compared to jQuery. You will inevitably end up encapsulating those in your own functions at which point why not just use jQuery for this type of DOM manipulation?
>jQuery and its cousins are great, and by all means use them if it makes it easier to develop your application.
>If you're developing a library on the other hand, please take a moment to consider if you actually need jQuery as a dependency. Maybe you can include a few lines of utility code, and forgo the requirement. If you're only targeting more modern browsers, you might not need anything more than what the browser ships with.
We may need a "You might not need React" website now.
reply