code: function hook() {
        var comp = hook.proxy.apply(null, arguments);
        for(var i = 0;i < hooks.length;i++) {
          hooks[i].apply(comp, arguments);
        }
        return comp;
      }
docs: Invoke constructor hooks by proxying to the main construct
  function and invoking registered hook functions in the scope
  of the created component.