Skip to content

Instantly share code, notes, and snippets.

@mathieuancelin
Created November 26, 2015 09:13
Show Gist options
  • Save mathieuancelin/90b59d88a35180ed7e3d to your computer and use it in GitHub Desktop.
Save mathieuancelin/90b59d88a35180ed7e3d to your computer and use it in GitHub Desktop.
import React from 'react';
import ReacDOM from 'react-dom';
const Component = React.createClass({
render() {
return (
<h1>Hello World!</h1>
);
}
});
exports.render = function renderToNode(node) {
return ReactDOM.render(Component, node);
};
<!DOCTYPE html>
<html>
<head></head>
<body>
<div id="app"></div>
<script src="http://xxxxx/component.min.js"></script>
<script>
Component.render(document.getElementById('app'));
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment