javascript - 警告:遇到两个孩子使用相同的键,`-`。密钥应该是唯一的,以便组件在更新时保持其身份
问题描述
我正在运行如下代码片段:
renderPropositions() {
const items = this.props.propositionAddress.map(async address => {
// get the instance of deployed contract
const instance = new web3.eth.Contract(JSON.parse(Proposition.interface), address);
const title = await instance.methods.pTitle().call();
return {
header: title,
meta: address
}
});
return <Card.Group items={items} />;
}
这不断地遇到上面的错误。但是当我删除async
andawait
函数时,没有错误。
有人可以帮忙吗?
解决方案
推荐阅读
- r - 使用 dplyr 将函数应用于一行中的选定列
- angular - 具有时间间隔的角条件轮询
- r - 为什么我使用 glm 函数会出现列表错误
- mql4 - 如何使用指标计数以及如何将关键事件转换为 MQL4 中的代码
- php - 使用 PHPMailer 发送电子邮件并将电子邮件标记为在 O365 中已回复
- css - 我在引导卡上实现了背景渐变叠加,但标题文本也得到了背景叠加
- vue.js - 改变 VueJS 的生命周期
- javascript - 是否可以在赛普拉斯中为常量值命名?
- oracle-apex - 为应用程序设计 Oracle APEX 数据库 - 心理障碍
- python - 在给定条件奇数或偶数的情况下,如何对列表中的偶数或奇数求和?