Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react props.children proptype

import PropTypes from 'prop-types'

...

static propTypes = {
    children: PropTypes.oneOfType([
        PropTypes.arrayOf(PropTypes.node),
        PropTypes.node
    ]).isRequired
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #react #proptype
ADD COMMENT
Topic
Name
7+7 =