基本使用如下:
Button.propTypes = {onClick: PropTypes.func.isRequired,className: PropTypes.string,children: PropTypes.node.isRequired,}
.PropTypes.array.PropTypes.bool.PropTypes.func.PropTypes.number.PropTypes.object.PropTypes.string
.PropTypes.node.PropTypes.element
原文:https://www.cnblogs.com/shiyujian/p/9447312.html