render : function () {
var value=this.state.value;
return (<div>
<input type="text" value={value} onChange={this.handleChange}/>
<p>{value}</p>
</div>)
}
这里的()是什么意思??还能这样用吗??不能使用{}??
这种写法是react中jsx语法规范,在render()中包含需要展示的html骨架,使用{}获取变量的值.
https://blog.csdn.net/chdyiboke/article/details/79887469
{}里面的是js代码