首页
移动开发
物联网
服务端
编程语言
企业开发
数据库
业界资讯
其他
搜索
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
js报错Cannot read property 'length' of undefined
vue报错 Cannot read property ‘_wrapper‘ 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 'mergeConfig' of undefined
Cannot read property 'xxx' of undefined
Cannot read property 'tap' of undefined
Cannot read property 'newLine' of undefined
今日推荐
周排行
LRU cache算法
windows10, 自带的OpenSSH, key权限问题, 文件权限问题
测试用例书写方法
HIVE-默认分隔符的(linux系统的特殊字符)查看,输入和修改
最贵的AMD 7nm显卡来了!这设计 够狂野
java多线程简单demo
[ 转载 ]在Android系统上使用busybox——最简单的方法
QT connect学习
BFSIFT算法分析
Xcode10:library not found for -lstdc++.6.0.9 临时解决
每日归档
更多
2024-08-06(0)
2024-08-05(0)
2024-08-04(0)
2024-08-03(0)
2024-08-02(0)
2024-08-01(0)
2024-07-31(0)
2024-07-30(0)
2024-07-29(0)
2024-07-28(0)