_hyperscript: A jQuery and JavaScript Alternative

VanillaJS v. jQuery v. hyperscript

Below are comparisons of how to implement various common UI patterns in vanilla javascript, jQuery and hyperscript.

In general, the VanillaJS version will be the most awkward.

The jQuery version will be better, but will separate the logic from the element in question. This is considered good practice by some people, in the name of separation of concerns, but it violates locality of behavior, which we feel is usually more important for system maintainability. (If you’ve ever had to hunt for an obscure event handler in jQuery, you know what we mean.)

Both the VanillaJS and JQuery verisons will often require callbacks, making for awkward expression of logic that is straight-forward and linear in hyperscript. This becomes especially pronounced in more complex promise or callback chains.

Read in full here:

https://hyperscript.org/comparison/

This thread was posted by one of our members via one of our news source trackers.