Skip to content

Instantly share code, notes, and snippets.

@cmrnh
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmrnh/94a5911b5608b7755e78 to your computer and use it in GitHub Desktop.
Save cmrnh/94a5911b5608b7755e78 to your computer and use it in GitHub Desktop.
Add react to spa-starter-kit
var React = require('react');
var App = React.createClass({
render:function(){
return (
<div></div>
);
}
});
module.exports = App;
(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