mirror of
https://github.com/wassname/generator-react-webpack.git
synced 2026-09-09 11:22:44 +08:00
Update to React 0.12.2
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('react/addons');
|
||||
var ReactTransitionGroup = React.addons.TransitionGroup;
|
||||
|
||||
// Export React so the devtools can find it
|
||||
(window !== window.top ? window.top : window).React = React;
|
||||
|
||||
// CSS
|
||||
require('../../styles/normalize.css');
|
||||
require('../../styles/main.css');
|
||||
|
||||
var imageURL = require('../../images/yeoman.png');
|
||||
|
||||
var <%= scriptAppName %> = React.createClass({
|
||||
render: function() {
|
||||
return (
|
||||
<div className='main'>
|
||||
<ReactTransitionGroup transitionName="fade">
|
||||
<img src={imageURL} />
|
||||
</ReactTransitionGroup>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
<% if (!reactRouter) {
|
||||
%>React.render(<<%= scriptAppName %> />, document.getElementById('content')); // jshint ignore:line
|
||||
<% } %>
|
||||
module.exports = <%= scriptAppName %>;
|
||||
Reference in New Issue
Block a user