@shopify/react-app-bridge-universal-provider
v3.1.4
Published
A self-serializing/deserializing `app-bridge-react` provider that works for isomorphic applications
Downloads
644
Keywords
Readme
@shopify/react-app-bridge-universal-provider
A self-serializing/deserializing app-bridge-react
provider that works for isomorphic applications.
Installation
yarn add @shopify/react-app-bridge-universal-provider
Usage
Props
The component takes children, apiKey
, shopOrigin
, and forceRedirect
. Similar to @shopify/app-bridge-react
's Provider.
Example
// App.tsx
import {AppBridgeUniversalProvider} from '@shopify/react-app-bridge-universal-provider';
function App({apiKey, shopOrigin}: {apiKey?: string; shopOrigin?: string}) {
return (
<AppBridgeUniversalProvider apiKey={apiKey} shopOrigin={shopOrigin}>
{/* rest of the app */}
</AppBridgeUniversalProvider>
);
}