2 . Which property name is used for type checking in react components? code example
Example 1: how to make proptypes either or
size: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number
]),
Example 2: how to make proptypes either or
size: PropTypes.oneOfType([
PropTypes.number,
PropTypes.oneOf([ 'SMALL', 'LARGE' ]),
]),