Skip to content
This repository was archived by the owner on Sep 1, 2024. It is now read-only.

Commit d62a775

Browse files
gbroquesljharb
authored andcommitted
[readme] Clarify usage of elementType
Closes #334.
1 parent 8f89a1c commit d62a775

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ MyComponent.propTypes = {
8282
// A React element (ie. <MyComponent />).
8383
optionalElement: PropTypes.element,
8484

85-
// A React element type (ie. MyComponent).
85+
// A React element type (eg. MyComponent).
86+
// a function, string, or "element-like" object (eg. React.Fragment, Suspense, etc.)
87+
// see https://github.com/facebook/react/blob/master/packages/shared/isValidElementType.js
8688
optionalElementType: PropTypes.elementType,
8789

8890
// You can also declare that a prop is an instance of a class. This uses

0 commit comments

Comments
 (0)