Created
August 23, 2019 20:45
-
-
Save hannachen/003758661a3711010863491103391d1c to your computer and use it in GitHub Desktop.
App Bridge Initialize - React Component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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