App reviews, troubleshooting, and recommendations
Hi,
I'm trying to migrate to the CDN version of app-bridge.
In the new version <ui-nav-menu> element has replaced <NavigationMenu> component. The documentation looked straight forward, but iframe reloads with every navigation.
Everything was fine with <NavigationMenu>. I used it like this:
<NavigationMenu navigationLinks={[
{label: 'Dashboard', destination: '/dashboard'},
{label: 'Settings', destination: '/settings'},
]} matcher={(link, location) => link.destination === location.pathname} />
The new version:
<ui-nav-menu> <a href="/" rel="home">App</a> <a href="/dashboard">Dashboard</a> <a href="/settings">Settings</a> </ui-nav-menu>
But app reloads and looses all state on every navigation.
App frontend is a React SPA. Shopify sends a request to the app backend (https://app-domain.com). App checks authentication and redirects to the endpoint that serves frontend static files https://app-domain.com/front
Does anyone have any idea on what to do?
i have the very same issue
You should implement custom router for sync host and iframe urls
https://shopify.dev/docs/api/app-bridge/previous-versions/app-bridge-from-npm/using-react
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023