code: function registerComponentHook (
    componentId,
    type, // hook type, could be "lifecycle" or "instance"
    hook, // hook name
    fn
  ) {
    if (!document || !document.taskCenter) {
      warn("Can't find available \"document\" or \"taskCenter\".");
      return
    }
    if (typeof document.taskCenter.registerHook === 'function') {
      return document.taskCenter.registerHook(componentId, type, hook, fn)
    }
    warn(("Failed to register component hook \"" + type + "@" + hook + "#" + componentId + "\"."));
  }
docs: Register the component hook to weex native render engine. The hook will be triggered by native, not javascript.