Created
November 26, 2015 09:13
-
-
Save mathieuancelin/90b59d88a35180ed7e3d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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