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

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.

5 Likes

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

4 Likes

Completely agree. We currently don’t have a working solution to navigate client-side within the app programmatically. Actually Remix’s navigate from useNavigate worked fine for me.

1 Like