-
Notifications
You must be signed in to change notification settings - Fork 219
Split Checkout form component into smaller files (II) #3106
Conversation
Size Change: +597 B (0%) Total Size: 1.11 MB
ℹ️ View Unchanged
|
addressFieldsConfig={ addressFieldsConfig } | ||
billingFields={ billingFields } | ||
defaultAddressFields={ defaultAddressFields } | ||
requirePhoneField={ requirePhoneField } | ||
setPhone={ setPhone } | ||
setShippingAsBilling={ setShippingAsBilling } | ||
setShippingFields={ setShippingFields } | ||
shippingAsBilling={ shippingAsBilling } | ||
shippingFields={ shippingFields } | ||
showPhoneField={ showPhoneField } |
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 feel like we're passing too many props to each component, maybe we can move the hook to inside ShippingFieldsStep
and BillingFieldsStep
, this is unrelated to this PR, just an idea.
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 found some weird behavior when calling useCheckoutAddress()
from ShippingFieldsStep
and BillingFieldsStep
separately, that's why I moved it one level up so the hook is shared by both components. I will proceed merging as-is, we can investigate it further in the future.
This is a follow-up of #3062 and part of the fixes I will add for #2319.
How to test the changes in this Pull Request:
Do some smoke testing of the Checkout block: