var divArr = [
'<div>布吉岛啊</div>',
'<div>呵呵呵</div>',
];
ReactDOM.render(
<div>{divArr}</div>,
document.getElementById("example")
);
を支える必要がありますが、それは誤りです:ReactJS:それぞれの子の配列やイテレータには、固有の「キー」は
Warning: Each child in an array or iterator should have a unique "key" prop. Check the top-level render call using . See [warning-keys][1] for more information.
と私は「キー」
を挿入する方法がわかりませんあなたはarray div
内を配置する必要があり
[リアクトに配列子供のためのユニークなキーを理解するのが重複する可能性を確認してください。 js](http://stackoverflow.com/questions/28329382/understanding-unique-keys-for-array-children-in-react-js) – Nier