Requirements
- React Native — built and tested against React Native 0.83
@tanstack/react-query(v5)@react-native-async-storage/async-storagereact-native-device-inforeact-native-onesignal
Installation
Getting your API key
API keys are issued per merchant — there is no developer signup and no claim code.- In your Shopify admin, open Stackfront → Settings → API key.
- Copy the key and your shop domain.
- Give both to whoever is building your mobile app — the SDK sends them on every request.
Quick Start
Wrap your app’s root component inStackfrontProvider. This initializes the SDK, fetches the remote configuration, and makes all services available through context hooks.
App.tsx
StackfrontProvider Props
What Happens on Init
WhenStackfrontProvider mounts, the SDK automatically:
- Fetches remote config — retrieves your storefront access token, OneSignal app ID, and feature flags from the Stackfront API.
- Initializes the Storefront GraphQL client — connects to Shopify’s Storefront API using the fetched token.
- Initializes local storage — sets up AsyncStorage for wishlist and event caching.
- Initializes OneSignal — if an OneSignal app ID is configured, OneSignal is initialized and the device is registered. No permission prompt is shown; call
usePush().requestPermission()at an appropriate moment. - Tracks the
app_openedevent — sends a lifecycle event to the analytics pipeline. - Sets
readytotrue— only then does your UI render.
useStackfront() hook:
Next Steps
- Learn about Core Concepts — the architecture, services, and hooks.
- Explore the Products & Search API to display your catalog.
- Set up Push Notifications with OneSignal.

