Created
November 19, 2013 15:17
-
-
Save andreypopp/7546879 to your computer and use it in GitHub Desktop.
unnamed: React component
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
<!doctype> | |
<html> | |
<head> | |
<title>Component Example</title> | |
<link rel="stylesheet" href="bundle.css"> | |
<style> | |
body { | |
padding: 10px; | |
} | |
</style> | |
<script src="bundle.js"></script> | |
<script> | |
var React = require("react-tools/build/modules/React"); | |
var Component = require("./index.jsx"); | |
React.renderComponent(Component({name: "You"}), document.body); | |
</script> | |
</head> | |
<body> | |
</body> | |
</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
.Component { | |
background: #444; | |
} |
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-tools/build/modules/React"); | |
module.exports = React({ | |
render: function() { | |
return ( | |
<div className="Component"> | |
Hello, {this.props.name}! | |
</div> | |
) | |
} | |
}); |
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
{ | |
"name": "unnamed", | |
"version": "0.0.0", | |
"description": "React component", | |
"dependencies": {}, | |
"style": "index.css", | |
"main": "index.jsx", | |
"example": "example.html", | |
"repository": { | |
"type": "git", | |
"url": "https://gist.github.com/7546879.git" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment