hydrogen/packages/hydrogen/src/components/CartShopPayButton/README.md
2021-11-09 18:20:09 -08:00

1 KiB

The CartShopPayButton component renders a ShopPayButton for the items in the cart. It must be a descendent of a CartProvider component.

Example code

import {CartShopPayButton, CartProvider} from '@shopify/hydrogen';

export default function MyComponent() {
  return (
    <CartProvider>
      <CartShopPayButton />
    </CartProvider>
  );
}

Component type

The CartShopPayButton component is a client component, which means that it renders on the client. For more information about component types, refer to React Server Components.