From b63d27ae83d04d7964d82c1e70bdead137ed210f Mon Sep 17 00:00:00 2001 From: Taeheon Kim Date: Sat, 13 Jul 2019 14:32:07 +0900 Subject: [PATCH] Update docs about an existence of .elementType Hi, I've met the same issue on [here](https://github.com/facebook/prop-types/issues/200) at storybook and found the following [PR](https://github.com/facebook/prop-types/pull/211) that adds the `elementType` feature. It could find the doc on npm, but not the official react site. --- content/docs/typechecking-with-proptypes.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/content/docs/typechecking-with-proptypes.md b/content/docs/typechecking-with-proptypes.md index c986fc010e4..9034ba9dc01 100644 --- a/content/docs/typechecking-with-proptypes.md +++ b/content/docs/typechecking-with-proptypes.md @@ -57,6 +57,9 @@ MyComponent.propTypes = { // A React element. optionalElement: PropTypes.element, + // A React element type (ie. MyComponent). + optionalElementType: PropTypes.elementType, + // You can also declare that a prop is an instance of a class. This uses // JS's instanceof operator. optionalMessage: PropTypes.instanceOf(Message),