this.props validation code example
Example 1: proptypes.objectof
Pokemon.propTypes = {
pokemon: PropTypes.shape({
name: PropTypes.string,
id: PropTypes.number,
base_stamina: PropTypes.number,
base_defense: PropTypes.number
})
}
Example 2: react propthpes or
size: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number
]),