"Focus on the fundamentals of HTML, CSS and JS. Everything else is ephemeral."
I don't mean to pick on whomever wrote these examples, but the ~7 lines of JS for the first example (fading out) shows either a lack of basic understanding or intentional complication to make hyperscript appear better in comparison. A more reasonable solution is 3 lines of code.
.fade { transition: opacity 500ms ease-out; }
<div class="fade" onclick="
this.style.opacity=0;
this.addEventListener('transitionend', () => this.remove());
">Remove Me</div>