Skip to content

Allow components to _either_ use context provider or use props #629

@frehner

Description

@frehner

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/> uses useShop(), but only need the locale from it. We could also allow a locale prop and not rely on the useShop() hook in that case.

- [ ] Metafield
- [ ] useMoney
- [x] ShopPayButton

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions