Created
September 23, 2015 01:59
-
-
Save cesarandreu/d01b42d7d9215e789ef6 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
/** | |
* 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