Last active
August 29, 2015 14:26
-
-
Save cmrnh/94a5911b5608b7755e78 to your computer and use it in GitHub Desktop.
Add react to spa-starter-kit
This file contains 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 App = React.createClass({ | |
render:function(){ | |
return ( | |
<div></div> | |
); | |
} | |
}); | |
module.exports = App; |
This file contains 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
(function () { | |
var React = require('react'), | |
App = require('./components/app.jsx'); // Our custom react component | |
//Needed for React Developer Tools | |
window.React = React; | |
// Render the main app react component into the document body. | |
// For more details see: https://facebook.github.io/react/docs/top-level-api.html#react.render | |
React.render(React.createElement(App), document.body); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment