Answer the question
In order to leave comments, you need to log in
How to apply a tag in React so that there is no error in the console?
there is a layout code
export default React.createClass({
render() {
return <html>
<head>
<title>{this.props.title}</title>
</head>
<body>
{this.props.children}
<script src="bundle.js"></script>
</body>
</html>;
}
});
res.render(
'index',
{
name: 'John'
},
(err, html) =>res.send(html)
);
Uncaught Invariant Violation: _registerComponent(...): Target container is not a DOM element.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question