目前验证 Date 反应道具的 首选方式是什么 ? 现在我正在使用: React.PropTypes.object 但是,这现在使 禁止道具类型 棉绒规则 失效 。 我应该使用 shape 还是有更好的方法?
十分确定您可以使用
PropTypes.instanceOf(Date)