I am developing an embedded app and am generally pretty confused about how to integrate the Shopify App Bridge React provider component (https://shopify.dev/tools/app-bridge/react-components/provider) with the OAuth flow. Should the App Bridge provider component only be initialised once the embedded app has been installed?
I am currently facing an issue if I wrap my App component with the App Bridge provider using the option:
This leads me to think that the Shopify App Bridge provider should be used conditionally (only after the app has been installed for a store). However this seems a little clunky and I haven't before seen this pattern of conditionally applying provider components in React apps. Am I on the right track or way off?