Skip to content

Commit

Permalink
Prevent new data re-render attempts during an existing render
Browse files Browse the repository at this point in the history
Prevent new data re-render attempts during an existing render
to help avoid React 16.13.0's "Cannot update a component from
inside the function body of a different component" warning
(facebook/react#17099).

These changes were originally implemented in
apollographql/react-apollo#3930.
  • Loading branch information
hwillson authored and benjamn committed May 4, 2020
1 parent 58ddb0b commit c3b71b4
Show file tree
Hide file tree
Showing 7 changed files with 296 additions and 148 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -164,6 +164,9 @@
- Ensure `useMutation` passes a defined `errorPolicy` option into its underlying `ApolloClient.mutate()` call. <br/>
[@jamesreggio](https://github.com/jamesreggio) in [#5863](https://github.com/apollographql/apollo-client/pull/5863)

- `useQuery`: Prevent new data re-render attempts during an existing render. This helps avoid React 16.13.0's "Cannot update a component from inside the function body of a different component" warning (https://github.com/facebook/react/pull/17099). <br/>
[@hwillson](https://github.com/hwillson) in [#6107](https://github.com/apollographql/apollo-client/pull/6107)

## Apollo Client 2.6.8

### Apollo Client (2.6.8)
Expand Down

0 comments on commit c3b71b4

Please sign in to comment.