diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-03-12 14:06:25 -0400 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2018-03-12 14:06:25 -0400 |
| commit | 46a0ba30ef54a7e36206481a4f5b2bf1f9702fca (patch) | |
| tree | a95fd534fc27761d8b26d0dffcdb5f300f7a61c7 /frontend/lib/withData.js | |
| parent | f7bea2d1b7be2b70dceb25c9837f608b538e9cec (diff) | |
wip
Diffstat (limited to 'frontend/lib/withData.js')
| -rw-r--r-- | frontend/lib/withData.js | 6 |
1 files changed, 2 insertions, 4 deletions
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 ( |
