我正在尝试使用React将excel转换为表格。我想将孩子添加到React元素。
let html_code = React.createElement("tbody");
let head = excel.shift();
/* append th */
let html_head = React.createElement("tr");
head.forEach(function(cell_data) {
html_head.appendChild ((React.createElement("th", null, cell_data));
});
html_code.appendChild(html_head);
我知道appendChild()不是函数。我只想知道如何追加。