NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
``` Warning: Component Profile declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment? ``` ``` import React from 'react'; import PropTypes from 'prop-types'; class Profile extends React.Component{ render(){ return ( <div className="profile-component"> <h1>我的名字{this.props.name}</h1> <h2>我今年{this.props.age}</h2> </div> ) } } const propTypes = { name: PropTypes.string, age: PropTypes.number, // ... define your prop validations }; Profile.PropTypes = propTypes; export default Profile; ``` ``` import React from 'react'; import PropTypes from 'prop-types'; class Profile extends React.Component{ render(){ return ( <div className="profile-component"> <h1>我的名字{this.props.name}</h1> <h2>我今年{this.props.age}</h2> </div> ) } } Profile.propTypes = { name: PropTypes.string, age: PropTypes.number, // ... define your prop validations }; //Profile.PropTypes = propTypes; export default Profile; ```