defaultProps
class App extends Component {
render() {
let on="hello evryone";
return (
<div>
{this.props.name}
</div>
);
}
}
App.defaultProps={
name:"jack"
}
static defaultProps
static defaultProps={
name:"jack"
}
render() {
return (
<div>
{this.props.name}
</div>
);
}
}
网友评论