📅  最后修改于: 2022-03-11 15:02:25.712000             🧑  作者: Mango
import PropTypes from 'prop-types';
class Greeting extends React.Component {
render() {
return (
Hello, {this.props.name}
);
}
}
Greeting.propTypes = {
name: PropTypes.string
};