📜  react props.children proptype - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:08.802000             🧑  作者: Mango

代码示例1
import PropTypes from 'prop-types'

...

static propTypes = {
    children: PropTypes.oneOfType([
        PropTypes.arrayOf(PropTypes.node),
        PropTypes.node
    ]).isRequired
}