Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to make proptypes either or

size: PropTypes.oneOfType([
    PropTypes.number,
    PropTypes.oneOf([ 'SMALL', 'LARGE' ]),
]),
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #proptypes
ADD COMMENT
Topic
Name
4+4 =