UNPKG

@shopify/shop-minis-react

Version:

React component library for Shopify Shop Minis with Tailwind CSS v4 support (source-only, requires TypeScript)

34 lines (33 loc) 910 B
import { createContext as t, useContext as n } from "react"; import { QueryClient as i } from "../../shop-minis-react/node_modules/.pnpm/@tanstack_query-core@5.86.0/node_modules/@tanstack/query-core/build/modern/queryClient.js"; const r = t( null ); function u() { const e = n(r); if (!e) throw new Error( "Shop Minis hooks must be used within <MinisContainer> or <MinisQueryProvider>. Wrap your component tree with one of these providers." ); return e; } function c() { return new i({ defaultOptions: { queries: { staleTime: 0, // Data is immediately stale gcTime: 0, // Don't keep in cache after component unmounts retry: 1, refetchOnWindowFocus: !1 } } }); } export { r as ShopMinisQueryClientContext, c as createShopMinisQueryClient, u as useShopMinisQueryClient }; //# sourceMappingURL=queryClient.js.map