From 84031dc3ef3c3e13d0a7abcc89a1d0548479f9c1 Mon Sep 17 00:00:00 2001 From: jos Date: Fri, 23 Sep 2016 14:02:08 +0200 Subject: [PATCH] Define keys --- src/JSONNode.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/JSONNode.js b/src/JSONNode.js index 939ec0a..cd14fc6 100644 --- a/src/JSONNode.js +++ b/src/JSONNode.js @@ -66,6 +66,7 @@ export default class JSONNode extends Component { if (data.props.length > 0) { const props = data.props.map(prop => { return h(JSONNode, { + key: prop.name, parent: this, prop: prop.name, data: prop.value, @@ -101,6 +102,7 @@ export default class JSONNode extends Component { if (data.items.length > 0) { const items = data.items.map((child, index) => { return h(JSONNode, { + key: index, parent: this, prop: index, data: child,