JSFiddle - React, Tailwind, and code Playground

JavaScript

class Popup extends jQuery.fn.init {
  constructor() {
    super('<div>test</div>');
    this.$wrapper = null;

    this.__proto__ = $.extend(true, this.__proto__, this.__proto__.__proto__)
    return this;
  }

  test() {
    console.log('hi')
  }
}

var t0 = performance.now();
for (var p = 0; p < 1000; p++) {

  var x = new Popup();
  x.appendTo('body');
  x.test()
}
var t1 = performance.now();
console.log("Took: " + (t1 - t0) + "msecs");