Skip to content

Native-safe Routing Rules

Bagisto Native relies on URL Pattern Matching to determine if a link should open in the current WebView, a new Modal, or an External Browser.

Standard Rules

PatternActionUse Case
Same DomainTurbo Drive NavigationMoving from Product -> Category.
Different DomainExternal BrowserOpening Payment Gateways or Social Links.

Modals for Auth / Cart

The native app is often configured to open path patterns like /checkout/cart or /customer/login in a native modal.

  • Ensure your Cart page URL matches the pattern expected by the native app configuration.
  • Do not use complex hash routers (/#/cart) as they are harder for native interceptors to detect. Use clean paths.

History Sync

Always include the <HotwireHistorySync /> component. It tells the Native App exactly what the current URL is after a client-side navigation, ensuring the native "Back" button works correctly.

Next Steps

Released under the MIT License.