Skip to content

Instantly share code, notes, and snippets.

@The-Quill
Created June 26, 2016 19:14
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 The-Quill/fea51710bdd50cf6b96cb15cf92393b7 to your computer and use it in GitHub Desktop.
Save The-Quill/fea51710bdd50cf6b96cb15cf92393b7 to your computer and use it in GitHub Desktop.
Easy < head > element with react
import React from 'react'
import Defaults from '../defaults'
const Head = React.createClass({
render(){
return <head>
<title>{Defaults.website_name}</title>
{
Defaults.stylesheets.map((file, key) => <link href={file.src} key={key} />)
}
{
Defaults.scripts.map((file, key) => <script src={file.src} key={key} />)
}
</head>
}
})
export { Head as default }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment