const Title=React.createClass({
getDefaults: ()=> {
return{
title:'hello world'
}
},
render:()=>{
return <h1>{this.props.title}</h1>
}
})
ReactDOM.render(
<Title/>,
document.getElementById('app6')
)
此种情况下报错:Cannot read property 'props' of undefined
**Excuse me:
(1)此种情况下箭头函数和this是否可以一起使用?
(2)如果可以一起使用请问有何种解决方法?**
can be changed to
The evil ES2015!!!
Let me turn it over for you.
Read more about the basics, it’s actually not difficult to understand