https://github.com/ruochuan12/react-app-demo
react-app-demo
https://github.com/ruochuan12/react-app-demo
Last synced: 7 months ago
JSON representation
react-app-demo
- Host: GitHub
- URL: https://github.com/ruochuan12/react-app-demo
- Owner: ruochuan12
- Created: 2017-02-25T15:09:13.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-17T18:51:22.000Z (about 7 years ago)
- Last Synced: 2025-01-18T10:11:44.807Z (9 months ago)
- Language: JavaScript
- Size: 118 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## react-app-demo
1、利用create react app搭建的react-demo
2、this指向,箭头函数[理解React中es6方法创建组件的this](http://www.cnblogs.com/mingjiezhang/p/5816461.html)
> 2.1 可以在class声明中的constructor()函数中,使用
```
this.handleClick = this.handleClick.bind(this);
```
2.2 bind方法
```
You {text} this. Click to toggle.
```
2.3 箭头函数
```
this.handleClick()}>
You {text} this. Click to toggle.
```