Skip to content

Commit

Permalink
Clarify usage of elementType (Closes #334)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbroques committed Feb 9, 2021
1 parent 8f89a1c commit 06f44c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ MyComponent.propTypes = {
// A React element (ie. <MyComponent />).
optionalElement: PropTypes.element,

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

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

0 comments on commit 06f44c7

Please sign in to comment.