import React from 'react';
export const isComponentClass = component => {
  if (!component) return false;

  const proto = Object.getPrototypeOf(component);
  if (proto === React.component || proto === Function.prototype) return true;
  return isComponentClass(proto);
};
