Created
April 14, 2016 17:40
-
-
Save zpao/2b545c0fc5c2fdc8a2911fd49b8b92a4 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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="utf8"> | |
<title>Testing</title> | |
</head> | |
<body> | |
<div id="container"> | |
React will render here | |
</div> | |
<script src="./bundle.js"></script> | |
</body> | |
</html> |
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
var React = require('react'); | |
var ReactDOM = require('react-dom'); | |
ReactDOM.render( | |
React.createElement('h1', null, 'hello world'), | |
document.getElementById('container') | |
); | |
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
{ | |
"name": "react-env-test", | |
"main": "index.js", | |
"scripts": { | |
"make": "NODE_ENV=production browserify index.js | uglifyjs -c > bundle.js" | |
}, | |
"dependencies": { | |
"browserify": "^13.0.0", | |
"react": "^15.0.1", | |
"react-dom": "^15.0.1", | |
"uglify-js": "^2.6.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment