Define keys

This commit is contained in:
jos 2016-09-23 14:02:08 +02:00
parent 10e9f16b75
commit 84031dc3ef
1 changed files with 2 additions and 0 deletions

View File

@ -66,6 +66,7 @@ export default class JSONNode extends Component {
if (data.props.length > 0) { if (data.props.length > 0) {
const props = data.props.map(prop => { const props = data.props.map(prop => {
return h(JSONNode, { return h(JSONNode, {
key: prop.name,
parent: this, parent: this,
prop: prop.name, prop: prop.name,
data: prop.value, data: prop.value,
@ -101,6 +102,7 @@ export default class JSONNode extends Component {
if (data.items.length > 0) { if (data.items.length > 0) {
const items = data.items.map((child, index) => { const items = data.items.map((child, index) => {
return h(JSONNode, { return h(JSONNode, {
key: index,
parent: this, parent: this,
prop: index, prop: index,
data: child, data: child,