function Name(props){
return <h1> {props.name} </h1>
}
function Url(props){
return <h1> {props.url} </h1>
}
function Nickname(props){
return <h1> {props.nickname} </h1>
}
function App(props){
return(
<div>
<Name name='heson'/>
<Url url='https://www.cnblogs.com/heson/' />
<Nickname nickname='renhaizhen' />
</div>
)
}
ReactDOM.render(
<App/>,
document.getElementById('example')
)
原文地址:https://www.cnblogs.com/heson/p/12009875.html
时间: 2024-10-20 02:34:50