We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
type
1 parent 75825b5 commit 12949e3Copy full SHA for 12949e3
components/utils/prop-types.js
@@ -10,6 +10,6 @@ import PropTypes from 'prop-types';
10
export function elementOfType(Component) {
11
// Not very intuitive, but this is the best way to check with PropTypes (see https://github.com/facebook/react/issues/2979)
12
return PropTypes.shape({
13
- type: PropTypes.oneOf([Component]),
+ type: PropTypes.oneOf([Component]).isRequired,
14
});
15
}
0 commit comments