React で テーブルタグを使用する時、table の直下に trタグを書くとエラーになってしまいました。
react.js:20541 Warning: validateDOMNesting(...): <tr> cannot appear as a child of <table>
↓こちらのように、thead や tbody をつけるとエラーがなくなりました。
var SimpleTable = React.createClass({
render: function(){
return (
名前 | 地域 | 番号 |
---|---|---|
山田1 | 東京1 | 01 |
山田2 | 東京2 | 02 |
);
}
});
ReactDOM.render(
document.getElementById('content')
)