-
Notifications
You must be signed in to change notification settings - Fork 292
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
Add the raw product returned from the Storefront API to also return from useProduct #735
Conversation
product.sellingPlanGroups, | ||
product.variants, |
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.
I'm assuming that this won't be a problem, changing the memo dependency array. I'd think if the product changes, so would these arrays. Also if these arrays change, so would the wrapping product.
Looks good to me so far. Would love to close #632 as part of this as well if we can! ❤️ |
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.
🚢
At the moment
useProduct()
does not return the actual product from the Storefront API. Instead it only returns variants and product options. So if the developer wants any of the root product properties, they instead have to manually drill those props, or setup their own provider. This change makes the entire raw product from the Storefront API available:Resolves #689