首页
移动开发
物联网
服务端
编程语言
企业开发
数据库
业界资讯
其他
搜索
react报错:Cannot read property ‘setState‘ of undefined
其他
2021-02-08 15:18:19
阅读次数: 0
错误如下:
代码如下:
原因是this已经不是当前组件的this了,可以在方法里加一个bind改变this的指向
猜你喜欢
转载自
blog.csdn.net/joyvonlee/article/details/108870387
React 报错"Cannot read property 'setState' of undefined"
react报错:Cannot read property ‘setState‘ of undefined
react报错 TypeError: Cannot read property 'setState' of undefined
Cannot read property 'setState' of undefined错误分析
React-Cannot read property 'state' of undefined at handleClick 报错原因
react跳转路由报错Cannot read property ‘push’ of undefined
react报错:Cannot read property ‘forEach‘ of undefined at Object.injectIntoGlobalHoo
React PropTypes Cannot read property 'string' of undefined
react native cannot read property 'navigate' of undefined
Cannot read property 'length' of undefined报错
vue报错Cannot read property 'component' of undefined
layui报错Cannot read property 'colspan' of undefined
报错 Cannot read property 'settings' of undefined
Cannot read property 'defaultView' of undefined 报错解决
axios报错: Cannot read property 'protocol' of undefined ....
jstree报错 Cannot read property 'state' of undefined
antd 报错 Cannot read property 'filter' of undefined
vue报错 Cannot read property ‘_wrapper‘ of undefined
js报错Cannot read property 'length' of undefined
vue 报错 Cannot read property ‘_wrapper‘ of undefined
mCustomScrollbar报错Cannot read property ‘autoUpdate‘ of undefined
【报错】TypeError: Cannot read property ‘url‘ of undefined
Cannot read property '0' of undefined
Cannot read property 'nodeType' of undefined
Cannot read property 'forEach' of undefined
Cannot read property 'matched' of undefined"
Cannot read property 'xxx' of undefined
Cannot read property 'mergeConfig' of undefined
Cannot read property 'newLine' of undefined
Cannot read property 'tap' of undefined
今日推荐
面壁智能发布 Eurux-8x22B 开源大模型 —— 堪称「理科状元」
开源日报 | 谷歌扶持鸿蒙上位;开源Rabbit R1;Docker加持的安卓手机;微软的焦虑和野心;海尔电器把开放平台关了
中国码农的“35岁魔咒”
蘭雅 CorelDRAW 插件 2024.5.1 国际劳动节版,免费下载
Arc Browser for Windows 1.0 正式 GA
90后程序员开发视频搬运软件、不到一年获利超 700 万,结局很刑!
周排行
OOP第二次作业
java web 乱码问题
android 禁止scrollview 因控件变化自动滚动到底的方法
mysql服务解压版的安装(5.7)
centos7 nginx+tomcat配置https 安装免费SSL Let’s Encrypt
使用Mosquitto遗嘱机制实现感知客户端上下线功能的方法
面向对象之------多态与多态性
开发Teams Tabs应用程序
C# 希尔排序
第2章 Jupyter Notebooks
每日归档
更多
2024-05-06(40)
2024-05-05(0)
2024-05-04(7)
2024-05-03(19)
2024-05-02(0)
2024-05-01(4)
2024-04-30(1)
2024-04-29(40)
2024-04-28(0)
2024-04-27(56)