function useHooks (hookName, handler) {
  const { __hooks } = this
  if (!__hooks) {
    return
  }
  // eslint-disable-next-line no-prototype-builtins
  if (!__hooks.hasOwnProperty(hookName)) {
    console.warn(`has no supported hook which name [${hookName}]`)
    return false
  }
  if (!Array.isArray(__hooks[hookName])) {
    __hooks[hookName] = []
  }

  if (findHookIndex.call(this, hookName, handler) === -1) {
    __hooks[hookName].push(handler)
  }
  return true
}
add hooks
@param { string } hookName
@param { Function } handler