Setup and start loading

Import the Provider and Loading component from @shopify/app-bridge-react. Only one Provider is needed for your application.

import React from 'react';
import ReactDOM from 'react-dom';
import {Provider, Loading} from '@shopify/app-bridge-react';

function MyApp() {
  const config = {apiKey: '12345', shopOrigin: shopOrigin};
  return (
    <Provider config={config}>
      <Loading />

const root = document.createElement('div');
ReactDOM.render(<MyApp />, root);

Stop loading

To stop loading unmount the Loading component.