Function: PropellerDepsProvider()
PropellerDepsProvider(
__namedParameters):Element
Defined in: context/PropellerContext.tsx:109
Provider for Tier 1 infrastructure (graphqlClient, services, currency, configuration). Mount once at the root of the app, above any routed tree.
Parameters
__namedParameters
Returns
Element
Example
// app/providers.tsx
import { GraphQLClient } from '@propeller-commerce/propeller-sdk-v2';
import { createServices, PropellerDepsProvider } from 'propeller-v2-react-ui';
const graphqlClient = new GraphQLClient({ endpoint: '/api/graphql' });
const services = createServices(graphqlClient);
export function Providers({ children }) {
return (
<PropellerDepsProvider value={{ graphqlClient, services, currency: '€', configuration }}>
<PropellerProvider value={scopeFromHostStores}>
{children}
</PropellerProvider>
</PropellerDepsProvider>
);
}