📅  最后修改于: 2022-03-11 15:03:48.055000             🧑  作者: Mango
class MyName extends React.Component {
// name property goes here:
get name() {
return 'Anthony';
}
render() {
return My name is {this.name}.
;
}
}
ReactDOM.render( , document.getElementById('app'));