React Propypes statiques basés sur la classe d'accessoires
class Greeting extends React.Component {
static defaultProps = {
name: 'stranger'
}
render() {
return (
<div>Hello, {this.props.name}</div>
)
}
}
ZUNAIR BIN ZUBAIR