Skip to content

Instantly share code, notes, and snippets.

@andreypopp
Created February 16, 2014 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreypopp/9040868 to your computer and use it in GitHub Desktop.
Save andreypopp/9040868 to your computer and use it in GitHub Desktop.
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