Skip to content

Commit

Permalink
react-compat: add isDOMComponentElement
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Sep 21, 2016
1 parent 17e4904 commit f8fb23c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/react-compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ if (REACT013) {
};
}

function isDOMComponentElement(inst) {
return React.isValidElement(inst) && typeof inst.type === 'string';
}

const {
mockComponent,
isElement,
Expand All @@ -170,6 +174,7 @@ export {
isElement,
isElementOfType,
isDOMComponent,
isDOMComponentElement,
isCompositeComponent,
isCompositeComponentWithType,
isCompositeComponentElement,
Expand Down

0 comments on commit f8fb23c

Please sign in to comment.