腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
1
回答
TypeError
:
无法
读取
React
中
未定义
的
“
comments
”
属性
、
、
、
对于一个组件,我通过onClick传入了适当
的
属性
。即使
属性
被正确地定义和传递,我似乎还是得到了这个错误。以下是代码片段:1.主要组件 import Menu from '.DishDetail dish={this.state.dishes.filter((dish) => dish.id === this.state.selectedDish)[0]} 在menucomponent
中
:<CardImg width="100%" src={dish.image} alt={di
浏览 8
提问于2020-06-13
得票数 0
回答已采纳
2
回答
错误:
未定义
的
TypeError
:
无法
读取
未定义
的
属性
“映射”
、
、
、
、
在componentDidMount to selectTodo
中
,分配this.props.selected。在控制台中,我检查selectTodo是一个包含
comments
数组
的
对象。我试图进入这个数组,但是我得到了一个错误: error: construct
浏览 0
提问于2019-06-13
得票数 0
回答已采纳
1
回答
如何访问正确
的
“此”内部地图: ReactJS
、
例如,我有一个具有两个绑定方法
的
react
组件: constructorbutton> ) return( <div className="<e
浏览 1
提问于2017-04-23
得票数 3
回答已采纳
1
回答
使用
react
路由器在div
中
呈现组件
、
、
我正在做一个新
的
项目,我对此反应很新。我们正在使用打字本(TSX)。到目前为止,我有一个带有id为“root”
的
div
的
index.html文件。我有一个main.tsx文件,我相信这是我
的
主要组件。from '
react
';import { Router, Route, IndexRoute, browserHistory文件,以便它出现在我
的
根div<e
浏览 3
提问于2016-04-18
得票数 1
回答已采纳
2
回答
错误
无法
读取
未定义
的
属性
(
读取
“配置”)。
TypeError
:
无法
读取
未定义
的
属性
(
读取
“配置”)
、
、
、
、
我在我
的
react
本机项目中安装了@
react
-native-community/cli-platform-android,现在我得到
的
是"error不能
读取
未定义
的
属性
(
读取
“配置”)。
TypeError
:
无法
读取
运行npm run android
的
未定义
属性
(
读取
“配置”)。
浏览 8
提问于2022-06-02
得票数 2
1
回答
Element.classList
无法
读取
属性
“切换”
、
、
我得到了一个错误: var numComments =
comments
.length; functiontoto(e)
浏览 3
提问于2017-07-05
得票数 0
回答已采纳
2
回答
React
无法
读取
未定义
的
属性
使用propTypes验证道具会出现以下错误:
TypeError
:
无法
读取
未定义
的
属性
“func”。所讨论
的
代码位于代码段
的
底部:import ProjectItem from
浏览 2
提问于2017-10-14
得票数 13
1
回答
按承诺获取构造函数变量
、
、
、
我
无法
使用javascript和
react
在获取调用
中
获得构造函数变量。我希望this.state.numXLabels
的
值在.then(函数(Json)回调
中
),但是我得到了
TypeError
:
无法
读取
未定义
(…)
的
属性
‘状态’。怎样才是正确
的
方法呢?以下是相关代码:
TypeError
:
无法
读取
未定义
(…)
浏览 4
提问于2016-04-23
得票数 2
回答已采纳
1
回答
使用“
react
test-renderer”-
无法
读取
未定义
的
属性
“hasOwnProperty”时出错
、
、
、
我试图在我
的
react
应用程序
中
实现Jest,但是当我导入
react
-test-renderer时,我得到了错误消息:
TypeError
:
无法
读取
未定义
的
属性
'hasOwnProperty‘。我
的
App.test.jsx文件
中
唯一
的
一行是: import TestRenderer from '
react
-test-rende
浏览 3
提问于2019-12-20
得票数 3
1
回答
未定义
属性
'__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED‘:
无法
读取
未定义
属性
TypeError
、
我得到了 <scriptsrc="res/build/
react
-min.js"></script> <script src="re
浏览 1
提问于2015-12-14
得票数 11
回答已采纳
3
回答
TypeError
:
无法
读取
未定义
的
属性
“
comments
”
、
、
运行
react
代码时出现以下错误:
TypeError
: Cannot read property '
comments
‘of undefined。我正在尝试消除这个错误,但做不到。这是因为我没有正确地映射我
的
数组,还是我需要添加更多
的
代码?请帮帮忙!这是我
的
MainComponent文件: import
React
, { Component} from '
react
'; import { Navbar, NavbarBra
浏览 36
提问于2020-08-31
得票数 1
6
回答
使用
React
时
的
TypeError
:
无法
读取
未定义
的
属性
“firstChild”
、
、
有时,当使用
React
库(如 )时,我会得到以下错误: /~/
react
-router/~/
react
/lib/ReactMount.js
浏览 10
提问于2014-11-26
得票数 28
回答已采纳
2
回答
在vue指令中使用全局函数
<div class="
comments
" v-if="!_.isEmpty(post.
comments
)"> </div</div>
未定义
的
TypeError
:
浏览 7
提问于2016-04-05
得票数 3
回答已采纳
1
回答
反应0.13.1渲染问题
、
我有一个非常简单
的
设置,
无法
使用Reactive0.13.1运行: return( )})
React
.createElement(
React
.createFactory(TheApp)), doc
浏览 1
提问于2015-04-12
得票数 2
回答已采纳
2
回答
在
react
中
捕获异步axios调用
的
响应
、
、
、
JSON.stringify(data) this.setState({ refNo: res.data.reference })) } 我不能设置从请求
中
得到
的
我想要捕获响应,并更改组件
中
的
state.function。下面的错误出现在页面的控制台中,在此之后我得到了一个白色页面。
react
_devtools_backend.js:6
TypeError
:
无法
读取
未定义</em
浏览 32
提问于2020-04-19
得票数 0
1
回答
ReactJS问题:() => vs函数()
、
、
跟随ReactJS教程从他们
的
网站。var Comment =
React
.createClass({ return ( render: () => { <div className="commentBox"> <h1>
Comments
</h1>CommentB
浏览 3
提问于2015-11-26
得票数 0
回答已采纳
2
回答
TypeError
:
无法
读取
未定义
的
属性
“string”;安装硼库
、
我安装了库,但有错误:push../node_modules/boron/modalFactory.js.module.exports :
无法
读取
未定义
的
C:/Users/m/Desktop/chrome-extension/node_modules/boron
浏览 3
提问于2019-10-21
得票数 0
1
回答
通量错误:未捕获ReferenceError:
未定义
通量
、
、
、
、
我正尝试在本地运行一个ReactJS + CoffeeScript应用程序,页面似乎加载到了JS
中
,但没有显示任何内容(空白白屏),控制台中显示以下错误请指点一下。
浏览 0
提问于2014-11-30
得票数 1
2
回答
在
读取
路径名
属性
时,
React
路由器-dom抛出两个错误。
、
当我使用反应性路由器-dom 6
的
路由时,我会看到两个不同
的
错误: C:/Users/FAMILIA/Desktop/packages/
react
-router/index.tsx:281 :
TypeError
:
无法
读取
未定义
的
浏览 9
提问于2021-11-07
得票数 1
1
回答
未捕获
的
TypeError
:
无法
读取
未定义
的
属性
“”onDismiss“”
我有一个
React
组件帖子: { author: 'Adam Beat', poin
浏览 7
提问于2017-03-14
得票数 2
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
1000个项目中前10名的JavaScript错误介绍
Visual Studio Code 1.25.1 发布,常规更新
React 组件,初学者笔记
PHP8还有半年就要来了,来看看有哪些新特性
深入了解 Proxy 代理
热门
标签
更多标签
云服务器
ICP备案
对象存储
腾讯会议
云直播
活动推荐
运营活动
广告
关闭
领券