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 committed Apr 16, 2020
1 parent c69f135 commit 1e7368b
Show file tree
Hide file tree
Showing 7 changed files with 296 additions and 148 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,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
Loading

0 comments on commit 1e7368b

Please sign in to comment.