-
Notifications
You must be signed in to change notification settings - Fork 786
graphql
HOC Creates New Reference to Mutation if any props
Change
#725
Comments
graphql
HOC Creates New Reference to Mutation if props
Changegraphql
HOC Creates New Reference to Mutation if any props
Change
This issue has been automatically marked as stale becuase it has not had recent activity. It will be closed if not further activity occurs. Thank you for your contributions to React Apollo! |
This issue has been automatically labled because it has not had recent activity. If you have not received a response from anyone, please mention the repository maintainer (most likely @jbaxleyiii). It will be closed if no further activity occurs. Thank you for your contributions to React Apollo! |
This issue has been automatically labled because it has not had recent activity. If you have not received a response from anyone, please mention the repository maintainer (most likely @jbaxleyiii). It will be closed if no further activity occurs. Thank you for your contributions to React Apollo! |
This issue has been automatically closed because it has not had recent activity after being marked as no recent activyt. If you belive this issue is still a problem or should be reopened, please reopen it! Thank you for your contributions to React Apollo! |
Steps to Reproduce
Buggy Behavior
The
graphql
wrapper will always create a new reference to themutate
property. The same issue applies for any function in theprops
option. Thus, using any shallow comparison like React's PureComponent will always fail.Expected Behavior
If possible, I the
graphql
wrapper should keep a single reference to themutate
prop. This should greatly improve performance. If the same logic could be applied to graphql'sprops
option too (similar to what recompose'swithHandlers
does), that would be perfect.The "work around" right now is to assign the
mutate
prop to a function on a wrapper class, and then pass that class function reference down to PureComponent children.Version
The text was updated successfully, but these errors were encountered: