Skip to content

Commit

Permalink
Merge pull request #3383 from googol7/patch-2
Browse files Browse the repository at this point in the history
Update react-apollo-migration.md
  • Loading branch information
Sashko Stubailo authored Apr 30, 2018
2 parents f68d632 + 306c938 commit c6faf84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/react-apollo-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ For more information on how to use the new Query component, read the [full guide
Much like the Query component, the Mutation and Subscription component are ways to use Apollo directly within your react tree. They simplify integrating with Apollo, and keep your React app written in React! For more information on the Mutation component, [check out the usage guide](./essentials/mutations.html) or if you are wanting to learn about the Subscription component, [read how to here](./advanced/subscriptions.html).

<h2 id="context">ApolloConsumer</h2>
With upcoming versions of React (starting in React 16.3), there is a new version of context that makes it easier than ever to use components connected to state higher in the tree. While the 2.1 doesn't require React 16.3, we are making easier than ever to start writing in this style with the `<ApolloConsumer>` component. This is just like the `withApollo` higher order component, just in a normal React component! It takes no props and expects a child function which recieves the instance of Apollo Client in your tree. For example:
With upcoming versions of React (starting in React 16.3), there is a new version of context that makes it easier than ever to use components connected to state higher in the tree. While the 2.1 doesn't require React 16.3, we are making it easier than ever to start writing in this style with the `<ApolloConsumer>` component. This is just like the `withApollo` higher order component, just in a normal React component! It takes no props and expects a child function which receives the instance of Apollo Client in your tree. For example:

```js
const MyClient = () => (
Expand Down

0 comments on commit c6faf84

Please sign in to comment.