Created
October 25, 2013 19:07
-
-
Save edjafarov/7160137 to your computer and use it in GitHub Desktop.
react js on compy example
This file contains hidden or 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 CommentBox = React.createClass({ | |
| render: function() { | |
| return ( | |
| <div class="commentBox"> | |
| Hello, world! I am a CommentBox. | |
| </div> | |
| ); | |
| } | |
| }); | |
| React.renderComponent( | |
| <CommentBox />, | |
| document.getElementById('content') | |
| ); |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]--> | |
| <!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]--> | |
| <!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]--> | |
| <!--[if gt IE 8]><!--> <html class="no-js" xml:lang="en" lang="en"> <!--<![endif]--> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | |
| <base href="/" target="_blank"> | |
| <title><!-- @echo title --></title> | |
| <meta name="viewport" content="width=device-width,initial-scale=1" /> | |
| <meta name="description" content="<!-- @echo description -->" /> | |
| <link rel="stylesheet" type="text/css" href="<!-- @echo appcss -->"> | |
| <script src="http://fb.me/react-0.5.0.js"></script> | |
| <script src="http://fb.me/JSXTransformer-0.5.0.js"></script> | |
| </head> | |
| <body> | |
| <div id="content"></div> | |
| <script type="text/jsx" data-main="<!-- @echo name -->/<!-- @echo main -->" src="<!-- @echo appdest -->"></script> | |
| </body> | |
| </html> |
This file contains hidden or 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
| { | |
| "name": "reacttest", | |
| "version": "0.0.0", | |
| "description": "Application reacttest", | |
| "main": "index.js", | |
| "license": "BSD", | |
| "compy": { | |
| "dependencies": { | |
| }, | |
| "local":[ | |
| ], | |
| "paths": ["local"], | |
| "main": "app.js", | |
| "banner": "/** @jsx React.DOM */" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment