propTypes = { name: PropTypes.string }; ... In this example, we're using PropTypes.string . ... This uses // JS's instanceof operator.
確定! 回上一頁