-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PWA-480] Price summary does not get updated after removing an item. #2329
Conversation
|
@@ -32,6 +32,9 @@ export const useProduct = props => { | |||
// If a product mutation is in flight, tell the cart. | |||
setIsCartUpdating(updateItemLoading || removeItemLoading); | |||
} | |||
|
|||
// Reset updating state on unmount | |||
return () => setIsCartUpdating(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use the onCompleted
callback instead?
https://www.apollographql.com/docs/react/data/mutations/#options
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hah whoops. We should get better about adding cleanups on unmount! Nice catch.
I had a question about using something a bit more explicit but I'm not even sure that'll work. I approve of this method.
Description
URL - https://develop.pwa-venia.com/
Steps -
Expected - Price summary should get updated for remaining products.
Actual - Price summary is blank, only labels no values.
Related Issue
Acceptance
Verification Stakeholders
Specification
Verification Steps
Screenshots / Screen Captures (if appropriate)
Checklist