Are Links In Polaris Embedded App Supposed To Not Change Url Path?
I'm using Next.js with Polaris (from following their guide here). Using
Link component imported from either Polaris or Next.js is not updating the url in the embedded app.
While the url path doesn't change, the view does change correctly (i.e. the component for the new path does render). Same result with breadcrumbs and
url prop for
Is this expected behavior?
Ended up figuring this out after many variations of trying to make links work correctly.
Answer: no, that's not expected behavior and links should change url path for Shopify embedded apps.
For Polaris, in order to make links change the URL you will need to install this library (@shopify/react-shopify-app-route-propagator). There is enough instructions on the page to figure out how to install it.
Important note on library usage:
AppProvider had to be in the parent component for
this.context.polaris.appBridge to work correctly. All the logic for context needed to be in a child component. This issue might've been unique to just my case, but maybe not.
- → Does anyone know how to solve IP canonicalization with shopify platform?
- → How can I add a featured image from a blog post to my homepage on shopify
- → Shopify - Get list of product from a specific collection
- → Shopify webhooks not wanted
- → Comparing two large files are taking over four hours
- → Need "add to cart" button price to update with correct amount depending on what checkbox is checked
- → How to append a variable inside another vaiable name in liquid html
- → GET /admin/webhooks.json returns an empty array
- → How to give border to to current displaying border
- → Shopify background image
- → Dynamic Attribute Names in Shopify Cart
- → What after added shopify store into shipstation