write propTYpes for object with strings code example
Example 1: how to make proptypes either or
size: PropTypes.oneOfType([
PropTypes.number,
PropTypes.oneOf([ 'SMALL', 'LARGE' ]),
]),
Example 2: proptypes.objectof
Pokemon.propTypes = {
pokemon: PropTypes.shape({
name: PropTypes.string,
id: PropTypes.number,
base_stamina: PropTypes.number,
base_defense: PropTypes.number
})
}