Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Remove onError and onCompleted from memoized options #3419

Merged
merged 14 commits into from Aug 30, 2019

Conversation

dylanwulf
Copy link
Contributor

This PR removes onError and onCompleted from the useDeepMemo keys. These two props are often specified as inline functions which are different on every render, and should not be used as memo keys.

Fixes #3406
Fixes #3407
Fixes apollographql/apollo-client#5241

Checklist:

  • Make sure all of the significant new logic is covered by tests

Copy link
Member

@hwillson hwillson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome catch @dylanwulf! Thanks very much!

@dylanwulf
Copy link
Contributor Author

@hwillson Thank you for the quick review! Should I update the bundlesize?

@hwillson
Copy link
Member

No problem at all @dylanwulf - I just bumped it, so we should be all set here. Thanks again!

@hwillson hwillson merged commit b916e10 into apollographql:master Aug 30, 2019
@dylanwulf dylanwulf deleted the error-disappears branch August 30, 2019 18:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants