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.
와 나는 '키'
를 삽입하는 방법을 모른다
가능한 중복을
unique key
을 넣어해야합니다. js] (http://stackoverflow.com/questions/28329382/understanding-unique-keys-for-array-children-in-react-js) – Nier