import React from 'react';
import ReactDOM from 'react-dom';
/1、/function sayHello
function SayHello(props){
return <h1>hello {props.name}</h1>
}
ReactDOM.render(
<SayHello name="qq111111"/>,
document.getElementById("root")
)

//2、React.createClass
const SayHello2 = React.createClass({
render(){
return <h1>hello {this.props.name}</h1>
}
})
ReactDOM.render(
<SayHello2 name="qq11111221"/>,
document.getElementById("root2")
)
//3、extends React.Component
class SayHello3 extends React.Component{
render(){
return <h1>hello {this.props.name}</h1>
}
}
ReactDOM.render(
<SayHello3 name="qq11111221"/>,
document.getElementById("root3")
)