Skip to content

Instantly share code, notes, and snippets.

@cesarandreu
Created September 23, 2015 01:59
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 cesarandreu/d01b42d7d9215e789ef6 to your computer and use it in GitHub Desktop.
Save cesarandreu/d01b42d7d9215e789ef6 to your computer and use it in GitHub Desktop.
/**
* AppLayout
* @flow
*/
import { Layout, LayoutContent, LayoutHeader, LayoutTitle } from '../Layout'
import shouldPureComponentUpdate from 'react-pure-render/function'
import React, { Component, PropTypes } from 'react'
export class AppLayout extends Component {
constructor (props) {
super(props)
this.shouldComponentUpdate = shouldPureComponentUpdate
}
render () {
const { children } = this.props
return (
<Layout>
<LayoutHeader>
<LayoutTitle title='Title!'/>
</LayoutHeader>
<LayoutContent>
{children}
</LayoutContent>
</Layout>
)
}
}
AppLayout.propTypes = {
children: PropTypes.node.isRequired
}
// export default Relay.createContainer(Layout, {
// fragments: {
// viewer: () => Relay.QL`
// fragment on Viewer {
// isRegistered,
// }
// `
// }
// })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment