Last active
February 28, 2016 00:43
-
-
Save sky4git/31129616a27972500759 to your computer and use it in GitHub Desktop.
JSX syntax
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
// COMPILED JSX SYNTAX INTO JAVASCRIPT | |
// main container component | |
var Container = React.createClass({displayName: "Container", | |
render: function() { | |
return( | |
React.createElement("div", null, | |
React.createElement(PostsGroupJSON, {source: "ajax/ajaxjson.html"}), | |
React.createElement(PostsGroupHTML, {source: "ajax/ajaxdemo.html"}) | |
) | |
); | |
} | |
}); |
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
// main container component | |
var Container = React.createClass({ | |
render: function() { | |
return( | |
<div> | |
<PostsGroupJSON source='ajax/ajaxjson.html' /> | |
<PostsGroupHTML source='ajax/ajaxdemo.html' /> | |
</div> | |
); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment