react是通过数据驱动的方式来实现页面的操作
1、在render函数里面添加样式
render(){
???const counterStyle={
???????color:‘red‘
???};
???return(
????????<div>
????????????<button onClick={this.onClickButton} style={counterStyle}> Click Me</button>
????????????<div>
????????????????Click Count:{this.state.count}
????????????</div>
????????</div>
???);
}
React从0到1--新的JSX样式
原文地址:https://www.cnblogs.com/lk1186578324/p/9802129.html