History Sync
triggerHistorySyncEvent(url: URL)
Notifies the native bridge of a navigation event.
Parameters
url: Use the nativeURLobject (e.g.,new URL('...')).
Usage
This is typically used inside your Router's "route change complete" hook.
javascript
/* Next.js Example (simplified) */
useEffect(() => {
const currentUrl = new URL(window.location.href);
triggerHistorySyncEvent(currentUrl);
}, [pathname]);Next Steps
- Learn about Theme sync
- Explore Cart count sync
- Understand Turbo Native detection
