首页 > 代码库 > propTypes

propTypes

propTypes

  React.PropTypes is deprecated as of React v15.5. Please use the prop-types library instead.

  技术分享

  You can define default values for your props by assigning to the special defaultPropsproperty:

  技术分享

参考:https://facebook.github.io/react/docs/typechecking-with-proptypes.html

propTypes