📜  反应默认 proptypes - Javascript 代码示例

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

代码示例3
Pokemon.propTypes = {
  pokemon: PropTypes.shape({
    name: PropTypes.string,
    id: PropTypes.number,
    base_stamina: PropTypes.number,
    base_defense: PropTypes.number
  })
}