diff --git a/B/P06.html b/B/P06.html
index 7f36654c9..aeea3a954 100644
--- a/B/P06.html
+++ b/B/P06.html
@@ -1,7 +1,7 @@
@@ -26,15 +26,19 @@
}
render(){
const {ishot}=this.state;
- return
今天天气很{ishot ? '炎热' : '凉爽'}
+ // 解决this指向问题
+ return 今天天气很{ishot ? '炎热' : '凉爽'}
+ }
+ demo(){
+ this.setState({
+ ishot:!this.state.ishot
+ })
}
}
ReactDOM.render(
,document.getElementById('app')
)
- function demo(){
- console.log('xxx')
- }
+