--- title: CartProvider description: " \ The `CartProvider` component synchronizes the state of the Storefront API Cart and a customer's cart, and allows you to more easily manipulate the cart by adding, removing, and updating it. It could be placed at the root of your app so that your whole app is able to use the `useCart()` hook anywhere. There are props that trigger when a call to the Storefront API is made, such as `onLineAdd={}` when a line is added to the cart. There are also props that trigger when a call to the Storefront API is completed, such as `onLineAddComplete={}` when the fetch request for adding a line to the cart completes. The `CartProvider` component must be a descendant of the `ShopifyProvider` component . \ " api_version: 2026-04 api_name: hydrogen-react source_url: html: https://shopify.dev/docs/api/hydrogen-react/latest/components/cartprovider md: https://shopify.dev/docs/api/hydrogen-react/latest/components/cartprovider.md --- Cart​Provider Not supported in this version.