demo/preact-dbmon/dbmon.js
function createComponent(Ctor, props, context) {
    var list = components[Ctor.name],
      inst;

    if (Ctor.prototype && Ctor.prototype.render) {
      inst = new Ctor(props, context);
      Component.call(inst, props, context);
    } else {
      inst = new Component(props, context);
      inst.constructor = Ctor;
      inst.render = doRender;
    }

    if (list) {
      for (var i = list.length; i--; ) {
        if (list[i].constructor === Ctor) {
          inst.nextBase = list[i].nextBase;
          list.splice(i, 1);
          break;
        }
      }
    }
    return inst;
  }
function createComponent(Ctor, props, context) {
    var list = components[Ctor.name],
      inst;

    if (Ctor.prototype && Ctor.prototype.render) {
      inst = new Ctor(props, context);
      Component.call(inst, props, context);
    } else {
      inst = new Component(props, context);
      inst.constructor = Ctor;
      inst.render = doRender;
    }

    if (list) {
      for (var i = list.length; i--; ) {
        if (list[i].constructor === Ctor) {
          inst.nextBase = list[i].nextBase;
          list.splice(i, 1);
          break;
        }
      }
    }
    return inst;
  }
function createComponent ( Ctor , props , context ) { var list = components [ Ctor . name ] , inst ; if ( Ctor . prototype && Ctor . prototype . render ) { inst = new Ctor ( props , context ) ; Component . call ( inst , props , context ) ; } else { inst = new Component ( props , context ) ; inst . constructor = Ctor ; inst . render = doRender ; } if ( list ) { for ( var i = list . length ; i -- ; ) { if ( list [ i ] . constructor === Ctor ) { inst . nextBase = list [ i ] . nextBase ; list . splice ( i , 1 ) ; break ; } } } return inst ; }
Create a component. Normalizes differences between PFC's and classful Components.
Create a component . Normalizes differences between PFC s and classful Components .