This repository has been archived by the owner on Apr 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes to README and comments to clarify ReactElement usage
Fixes #24.
- Loading branch information
1 parent
d54a0f9
commit 33a6759
Showing
9 changed files
with
53 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
/** | ||
* Returns whether a component instance is of a particular type. | ||
* @param {ReactComponent} component the component to check | ||
* @param {Function|String} componentType the type of component to check against | ||
* Returns whether an element instance is of a particular type. | ||
* @param {ReactElement} element the element to check | ||
* @param {Function|String} componentType the type of element to check against | ||
* @return {Boolean} whether the element is the supplied type | ||
*/ | ||
export default function isComponentOfType(component, componentType) { | ||
return component.type === componentType; | ||
export default function isComponentOfType(element, componentType) { | ||
return element.type === componentType; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
/** | ||
* Returns whether a component instance is a DOM component. | ||
* Returns whether an element is a DOM element. | ||
* | ||
* @param {ReactElement} component | ||
* @return {Boolean} whether the element is a DOM component | ||
* @param {ReactElement} element | ||
* @return {Boolean} whether the element is a DOM element | ||
*/ | ||
export default function isDOMComponent(component) { | ||
return typeof component.type === 'string'; | ||
export default function isDOMComponent(element) { | ||
return typeof element.type === 'string'; | ||
} |