网站介绍:文章浏览阅读755次。1. this关键字直观上来说,我们可以将其按照Java语言中的写法来构建一个最初始的代码逻辑,比如:class MyElement extends React.Component { constructor() { super(); this.datas= ["张三", "李四", "王五"] }// 点击处理 userClick() { console.log(this) } render() { return ( <ul&_react this undefined
- 链接地址:https://mengfou.blog.csdn.net/article/details/124991983
- 链接标题:【精选】React基础—this关键字以及undefined问题_react this undefined_梦否的博客-CSDN博客
- 所属网站:mengfou.blog.csdn.net
- 被收藏次数:7872
- 网站标签:react this undefined