public/lib/react.development.js
/**
 * Given an element, validate that its props follow the propTypes definition,
 * provided by the type.
 *
 * @param {ReactElement} element
 */
Given an element, validate that its props follow the propTypes definition,
provided by the type.


Given an element validate that its props follow the propTypes definition provided by the type .
function validatePropTypes(element) {
  var componentClass = element.type;
  if (typeof componentClass !== 'function') {
    return;
  }
  var name = componentClass.displayName || componentClass.name;
  var propTypes = componentClass.propTypes;
  if (propTypes) {
    currentlyValidatingElement = element;
    checkPropTypes_1(propTypes, element.props, 'prop', name, getStackAddendum);
    currentlyValidatingElement = null;
  } else if (componentClass.PropTypes !== undefined && !propTypesMisspellWarningShown) {
    propTypesMisspellWarningShown = true;
    warning_1(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
  }
  if (typeof componentClass.getDefaultProps === 'function') {
    warning_1(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
  }
}
function validatePropTypes ( element ) { var componentClass = element . type ; if ( typeof componentClass !== 'function' ) { return ; } var name = componentClass . displayName || componentClass . name ; var propTypes = componentClass . propTypes ; if ( propTypes ) { currentlyValidatingElement = element ; checkPropTypes_1 ( propTypes , element . props , 'prop' , name , getStackAddendum ) ; currentlyValidatingElement = null ; } else if ( componentClass . PropTypes !== undefined && ! propTypesMisspellWarningShown ) { propTypesMisspellWarningShown = true ; warning_1 ( false , 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?' , name || 'Unknown' ) ; } if ( typeof componentClass . getDefaultProps === 'function' ) { warning_1 ( componentClass . getDefaultProps . isReactClassApproved , 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.' ) ; } }
Given an element, validate that its props follow the propTypes definition,
 provided by the type.
Given an element validate that its props follow the propTypes definition provided by the type .