Skip to content

Instantly share code, notes, and snippets.

@andreypopp andreypopp/assets.js
Created Feb 16, 2014

Embed
What would you like to do?
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
You can’t perform that action at this time.