Created
February 16, 2014 21:26
-
-
Save andreypopp/9040868 to your computer and use it in GitHub Desktop.
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
function Stylesheets() { | |
var registry = requireAssets.currentRegistry(); | |
var stylesheets = []; | |
for (var url in registry.urlToFilename) | |
if (/\.css$/.exec(url)) | |
stylesheets.push(<link rel="stylesheet" key={url} href={url} />); | |
return stylesheets; | |
} | |
var App = React.createClass({ | |
render: function() { | |
return ( | |
<html> | |
<head> | |
<Stylesheets /> | |
<script src="/bundle.js" /> | |
</head> | |
<body> | |
Hello, world! | |
</body> | |
</html> | |
); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment