我只是在创建一个组件,如下所示。该组件只是一个复选框,我正在尝试使其成为表主体中每一行的一部分。不幸的是,由于到目前为止已经进行了一些开发,所以我没有使用react-data-grid。
var ToggleCheckbox = React.createClass({
render: function () {
return <input type="checkbox"></input>
}
});
但是在使用它时,我遇到了以下错误,但我不熟悉所收到的错误,这肯定是因为我缺少了一些细微的东西,但无法弄清楚:
react-with-addons.js?app_version=1556912508217:20258 Uncaught Error: Invariant Violation: ReactMount: Root element ID differed from reactRootID.
at invariant (react-with-addons.js?app_version=1556912508217:20258)
at Object.findReactContainerForID (react-with-addons.js?app_version=1556912508217:12935)
at isValid (react-with-addons.js?app_version=1556912508217:12485)
at Object.getNodeFromInstance (react-with-addons.js?app_version=1556912508217:12461)
at findDOMNode (react-with-addons.js?app_version=1556912508217:19261)
at Constructor.getDOMNode (react-with-addons.js?app_version=1556912508217:4552)
at Constructor.componentDidMount (react-with-addons.js?app_version=1556912508217:8782)
at Constructor.chainedFunction [as componentDidMount] (react-with-addons.js?app_version=1556912508217:6044)
at CallbackQueue.notifyAll (react-with-addons.js?app_version=1556912508217:1063)
at ReactReconcileTransaction.close (react-with-addons.js?app_version=1556912508217:14612)