I'm trying to just send the client a single line like so:
<script src="/js/app.js"></script>
which is valid HTML5.
I then want to build the page back up with React.js. E.g. (note modified code, I had some errors in my simplified code),
React = require('react');
e = React.createElement;
App = React.createClass({
render: function(){
return e('html', null,
(e('head', null,
e('script', {src: '/js/app.js'})),
e('body', null, 'hello!')));
}
});
React.render(e(App, null), document.documentElement);
the resulting DOM:
<html>
<head></head>
<body data-reactid=".0.0">hello!</body>
<body></body>
</html>