Skip to content

Instantly share code, notes, and snippets.

@hannachen
Created August 23, 2019 20:45
Show Gist options
  • Save hannachen/003758661a3711010863491103391d1c to your computer and use it in GitHub Desktop.
Save hannachen/003758661a3711010863491103391d1c to your computer and use it in GitHub Desktop.
App Bridge Initialize - React Component
import React from 'react';
import ReactDOM from 'react-dom';
import {Provider, TitleBar} from '@shopify/app-bridge-react';
function MyApp() {
const config = {apiKey: '12345', shopOrigin: shopOrigin};
return (
<Provider config={config}>
<TitleBar title="My page title"/>
</Provider>
);
}
const root = document.createElement('div');
document.body.appendChild(root);
ReactDOM.render(<MyApp />, root);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment