diff --git a/examples/with-apollo-and-redux-saga/README.md b/examples/with-apollo-and-redux-saga/README.md index 63f39083..226e29f6 100644 --- a/examples/with-apollo-and-redux-saga/README.md +++ b/examples/with-apollo-and-redux-saga/README.md @@ -49,3 +49,6 @@ export default withReduxSaga(connect(mapStateToProps, null)(Index)); ``` `connect` must go inside `withReduxSaga` otherwise `connect` will not be able to find the store. + +### Note: +In these *with-apollo* examples, the ```withData()``` HOC must wrap a top-level component from within the ```pages``` directory. Wrapping a child component with the HOC will result in a ```Warning: Failed prop type: The prop 'serverState' is marked as required in 'WithData(Apollo(Component))', but its value is 'undefined'``` error. Down-tree child components will have access to Apollo, and can be wrapped with any other sort of ```graphql()```, ```compose()```, etc HOC's. diff --git a/examples/with-apollo-and-redux/README.md b/examples/with-apollo-and-redux/README.md index 548a4556..5f3b1940 100644 --- a/examples/with-apollo-and-redux/README.md +++ b/examples/with-apollo-and-redux/README.md @@ -48,4 +48,7 @@ const mapStateToProps = state => ({ }); export default withRedux(connect(mapStateToProps, null)(Index)); -``` \ No newline at end of file +``` + +### Note: +In these *with-apollo* examples, the ```withData()``` HOC must wrap a top-level component from within the ```pages``` directory. Wrapping a child component with the HOC will result in a ```Warning: Failed prop type: The prop 'serverState' is marked as required in 'WithData(Apollo(Component))', but its value is 'undefined'``` error. Down-tree child components will have access to Apollo, and can be wrapped with any other sort of ```graphql()```, ```compose()```, etc HOC's. diff --git a/examples/with-apollo-auth/README.md b/examples/with-apollo-auth/README.md index ff14ceff..00482128 100644 --- a/examples/with-apollo-auth/README.md +++ b/examples/with-apollo-auth/README.md @@ -66,3 +66,7 @@ It is important to note the use of Apollo's `resetStore()` method after signing To get this example running locally, you will need to create a graph.cool account, and provide [the `project.graphcool` schema](https://github.com/zeit/next.js/blob/master/examples/with-apollo-auth/project.graphcool). + + +### Note: +In these *with-apollo* examples, the ```withData()``` HOC must wrap a top-level component from within the ```pages``` directory. Wrapping a child component with the HOC will result in a ```Warning: Failed prop type: The prop 'serverState' is marked as required in 'WithData(Apollo(Component))', but its value is 'undefined'``` error. Down-tree child components will have access to Apollo, and can be wrapped with any other sort of ```graphql()```, ```compose()```, etc HOC's. diff --git a/examples/with-apollo/README.md b/examples/with-apollo/README.md index 563485e8..feee245d 100644 --- a/examples/with-apollo/README.md +++ b/examples/with-apollo/README.md @@ -48,3 +48,6 @@ In this simple example, we integrate Apollo seamlessly with Next by wrapping our On initial page load, while on the server and inside `getInitialProps`, we invoke the Apollo method, [`getDataFromTree`](http://dev.apollodata.com/react/server-side-rendering.html#getDataFromTree). This method returns a promise; at the point in which the promise resolves, our Apollo Client store is completely initialized. This example relies on [graph.cool](https://www.graph.cool) for its GraphQL backend. + +### Note: +In these *with-apollo* examples, the ```withData()``` HOC must wrap a top-level component from within the ```pages``` directory. Wrapping a child component with the HOC will result in a ```Warning: Failed prop type: The prop 'serverState' is marked as required in 'WithData(Apollo(Component))', but its value is 'undefined'``` error. Down-tree child components will have access to Apollo, and can be wrapped with any other sort of ```graphql()```, ```compose()```, etc HOC's.