Last active
August 29, 2015 14:13
-
-
Save waynelkh/64f6b9b8dc4b82a48e6e to your computer and use it in GitHub Desktop.
React Warning: This JSX uses a plain function. Only React components are valid in React's JSX transform
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 Yo = require('./Yo.jsx'); | |
var App = React.createClass({ | |
render: function(){ | |
return ( | |
<div>Hello wrold | |
<Yo /> | |
</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
var React = require('react'); | |
var App = React.createFactory(require('./components/App.jsx')); | |
React.render(App(), document.body); | |
/* | |
* or you can use jsx | |
* But this file need to JSXTransformer | |
*/ | |
var React = require('react'); | |
var App = require('./components/App.jsx'); | |
React.render(<App />, document.body); |
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 Yo = React.createClass({ | |
render: function(){ | |
return ( | |
<div>Yo man hello yo </div> | |
); | |
} | |
}); | |
module.exports = Yo; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment