Код: Выделить всё
Warning: validateDOMNesting(...): cannot appear as a child of .
See (unknown) > thead > th.
вот мой код для этой таблицы:
Код: Выделить всё
React.DOM.table
className: 'table table-bordered'
React.DOM.thead null,
React.DOM.th null, 'Description'
React.DOM.th null, 'Actions'
React.DOM.tbody null,
for post in @state.posts
React.createElement Post, key: post.id, post: post,
handleDeletePost: @deletePost
Я попробовал добавить тег tr под thead, и это вызвало дополнительную дополнительную ошибку. вот на что я изменил свой код:
Код: Выделить всё
React.DOM.table
className: 'table table-bordered'
React.DOM.thead null
React.DOM.tr null
React.DOM.th null, 'Description'
React.DOM.th null, 'Actions'
React.DOM.tbody null,
for post in @state.posts
React.createElement Post, key: post.id, post: post,
handleDeletePost: @deletePost
Код: Выделить всё
Warning: validateDOMNesting(...): tr cannot appear as a child of table. See (unknown) > table > tr. Add a to your code to match the DOM tree generated by the browser.
Подробнее здесь: https://stackoverflow.com/questions/439 ... n-thead-th