Please help me to understand my issue.
I have the following on the server-side (Node.js):
var React = require('react');
var ReactDOMServer = require('react-dom/server');
var TestComponent = React.createClass({
render : function() {
return <div>test</div>
}
});
// express router callback..
function(req, res, next) {
res.send(ReactDOMServer.renderToString(TestComponent));
};
An example of response:
<div data-reactid=".2e2hyaaz0n4" data-react-сhecksum="1124798100">test</div>
And on the client-side:
ReactDOM.render(React.createElement(template), document.getElementById('container'));
I'm having the following error in browser console:
Uncaught Invariant Violation: Invalid tag: <div data-reactid=".2e2hyaaz0n4" data-react-checksum="1124798100">test</div>
Any help will be appreciated!