Skip to content

Commit

Permalink
Merge pull request #9434 from ctataryn/patch-1
Browse files Browse the repository at this point in the history
Added "Breaking Changes" to @apollo/react-hooks section
  • Loading branch information
Stephen Barlow authored Feb 25, 2022
2 parents 6ca525a + 6f754de commit 29ec993
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/source/migrating/apollo-client-3-migration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ import { ApolloProvider, useQuery, useApolloClient } from '@apollo/client'

As part of migrating, we recommend removing all `@apollo/react-hooks` dependencies.

**Breaking Changes:**

* `useQuery` [no longer maintains the previously fetched results](https://github.com/apollographql/apollo-client/pull/6566) in its `data` result when loading new data. Instead, when new data is being loaded (i.e. `loading` === `true`) the `data` result of `useQuery` is set to `undefined`. Use the `previousData` result as a bridge to the old v2 behavior.
* `refetch` functionality of `useQuery` [was broken in v3.5.x until it was fixed in v3.5.8](https://github.com/apollographql/apollo-client/issues/9101). Previous to this version, if the `skip: true` option was used, `refetch` would always be `undefined`.


### @apollo/react-ssr

React Apollo’s SSR utilities (like `getDataFromTree`, `getMarkupFromTree`, and `renderToStringWithData`) are included in the `@apollo/client` package. Access them via `@apollo/client/react/ssr`:
Expand Down

0 comments on commit 29ec993

Please sign in to comment.