Starts watching for navigation changes and records page views automatically. Supports both hash-based and History API-based navigation.
A function that removes the watcher when called
// Start watching using default navigation type from init()const unwatcher = watch();// Stop watchingunwatcher(); Copy
// Start watching using default navigation type from init()const unwatcher = watch();// Stop watchingunwatcher();
Starts watching for navigation changes and records page views automatically. Supports both hash-based and History API-based navigation.