function isChildOf(child, parent) {
  while (child && child.parent) {
    if (child.parent === parent) {
      return true;
    }
    child = child.parent;
  }
  return false;
}
Returns true if the component is a child of the parent.
@param {any} child - The child component to check.
@param {any} parent - The parent component to check.
@returns {boolean} - TRUE if the child is a child of the parent; FALSE otherwise.