2021年2月1日

Handling Events

摘要: Handling events with React elements is very similar to handling events on DOM elements. There are some syntax differences: React events are named usin 阅读全文

posted @ 2021-02-01 20:01 漫思 阅读(145) 评论(0) 推荐(0)

react报错 TypeError: Cannot read property 'setState' of undefined

摘要: 代码如下: class test extends Component { constructor(props) { super(props); this.state = { liked: false }; } handleClick(event) { this.setState({liked: !t 阅读全文

posted @ 2021-02-01 17:38 漫思 阅读(308) 评论(0) 推荐(0)

导航