JSFiddle - React, Tailwind, and code Playground
JavaScript
function extends(child, parent) {
var emptyCtor = function() {};
emptyCtor.prototype = parent.prototype;
child.prototype = new emptyCtor;
child._super = parent;
return child;
};
var ParentClass = function() {
this.a = 1;
};
var ChildClass = extends(function() {}, ParentClass);
document.body.innerHTML = new ChildClass.a;