From 46a0ba30ef54a7e36206481a4f5b2bf1f9702fca Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Mon, 12 Mar 2018 14:06:25 -0400 Subject: wip --- frontend/lib/withData.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'frontend/lib/withData.js') diff --git a/frontend/lib/withData.js b/frontend/lib/withData.js index 0c68f49..b784653 100644 --- a/frontend/lib/withData.js +++ b/frontend/lib/withData.js @@ -12,6 +12,7 @@ function getComponentDisplayName(Component) { export default ComposedComponent => class WithData extends React.Component { static displayName = `WithData(${getComponentDisplayName(ComposedComponent)})`; + static propTypes = { serverState: PropTypes.object.isRequired, }; @@ -61,10 +62,7 @@ export default ComposedComponent => }; } - constructor(props) { - super(props); - this.apollo = initApollo(this.props.serverState.apollo.data); - } + apollo = initApollo(this.props.serverState.apollo.data); render() { return ( -- cgit v1.3