React 组件 复合组件
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')
)