-
Notifications
You must be signed in to change notification settings - Fork 281
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
Allow components to _either_ use context provider or use props #629
Comments
Hm, while it makes sense for easy ones like |
prop should override context if no prop value is provided - we default to context |
We should also update CartProvider to optionally pull from ShopifyConfig the contryCode. |
Decision: leave the |
Quite a few components rely on a context provider and associated hook, but in many cases it may also make sense to allow devs to pass in a prop instead and not rely on setting up a context provider.
For example,
<Metafield/>
usesuseShop()
, but only need thelocale
from it. We could also allow alocale
prop and not rely on theuseShop()
hook in that case.Tasks
The text was updated successfully, but these errors were encountered: