【发布时间】:2017-06-05 22:53:52
【问题描述】:
我正在为我的 ReactJS webapp 使用 BlueprintJS UI 组件。 我想在使用 Tree 组件呈现文件资源管理器时摆脱警告:
Each child in an array or iterator should have a unique "key" prop. Check the render method of "Tree"
在documentation of the Tree component 中,我可以找到key 属性,这可能是我正在寻找的东西,但我无法消除警告。
node: [
{
hasCaret: true,
iconName: "folder-close",
label: "Folder 0",
key: '1e'
}
]
Eveb 这个简单的树结构给了我警告。有什么建议吗?
【问题讨论】:
标签: reactjs web-component blueprintjs