How to Migrate useNavigate in App Bridge React 4.x.x?

How to Migrate useNavigate in App Bridge React 4.x.x?

IngEoGeoBuk
Shopify Partner
2 0 5

Hello.

I want to use Navigation in Next.js,

But There are no contents React Hooks or React Components in docs(https://shopify.dev/docs/api/app-bridge-library/apis/navigation)
unlike previous-version docs(https://shopify.dev/docs/api/app-bridge/previous-versions/actions/navigation)

 

Only Remix version of the guide exists in that document.

(I don't have any plan using Remix.)

How to Migrate useNavigate in App Bridge React 4.x.x using Next.js?

Thank you.

Reply 1 (1)

martynovkyrylo
Shopify Partner
3 0 1

This still needs to be solved. As mentioned in this guide they suggest using Navigation API instead but it's not relevant as it does not provide you an option to navigate user as it was before programmatically.
Navigation.navigate
- not supported in many browsers
- not allows you to navigate in new page
- not allows to use syntax that they made before