@ionic/react 8.8.1-dev.11774273905.1c3b9598 → 8.8.1-dev.11774384072.1e807ca8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,7 @@ export interface IonRouterContextState {
6
6
  routeInfo: RouteInfo;
7
7
  push: (pathname: string, routerDirection?: RouterDirection, routeAction?: RouteAction, routerOptions?: RouterOptions, animationBuilder?: AnimationBuilder) => void;
8
8
  back: (animationBuilder?: AnimationBuilder) => void;
9
+ navigateRoot: (pathname: string, animationBuilder?: AnimationBuilder) => void;
9
10
  canGoBack: () => boolean;
10
11
  nativeBack: () => void;
11
12
  }
@@ -34,6 +35,13 @@ export type UseIonRouterResult = {
34
35
  * @param animationBuilder - Optional - A custom transition animation to use
35
36
  */
36
37
  goBack(animationBuilder?: AnimationBuilder): void;
38
+ /**
39
+ * Navigates to a new root pathname, clearing the navigation history and unmounting all previous views.
40
+ * After navigation, canGoBack() will return false. Useful for navigating to a new root after login/logout.
41
+ * @param pathname - The path to navigate to
42
+ * @param animationBuilder - Optional - A custom transition animation to use
43
+ */
44
+ navigateRoot(pathname: string, animationBuilder?: AnimationBuilder): void;
37
45
  /**
38
46
  * Determines if there are any additional routes in the Router's history. However, routing is not prevented if the browser's history has more entries. Returns true if more entries exist, false if not.
39
47
  */
@@ -11,6 +11,7 @@ interface NavManagerProps {
11
11
  onNativeBack: () => void;
12
12
  onNavigateBack: (route?: string | RouteInfo, animationBuilder?: AnimationBuilder) => void;
13
13
  onNavigate: (path: string, action: RouteAction, direction?: RouterDirection, animationBuilder?: AnimationBuilder, options?: any, tab?: string) => void;
14
+ onNavigateRoot: (pathname: string, animationBuilder?: AnimationBuilder) => void;
14
15
  onSetCurrentTab: (tab: string, routeInfo: RouteInfo) => void;
15
16
  onChangeTab: (tab: string, path: string, routeOptions?: any) => void;
16
17
  onResetTab: (tab: string, path: string, routeOptions?: any) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionic/react",
3
- "version": "8.8.1-dev.11774273905.1c3b9598",
3
+ "version": "8.8.1-dev.11774384072.1e807ca8",
4
4
  "description": "React specific wrapper for @ionic/core",
5
5
  "keywords": [
6
6
  "ionic",
@@ -40,7 +40,7 @@
40
40
  "css/"
41
41
  ],
42
42
  "dependencies": {
43
- "@ionic/core": "8.8.1-dev.11774273905.1c3b9598",
43
+ "@ionic/core": "8.8.1-dev.11774384072.1e807ca8",
44
44
  "ionicons": "^8.0.13",
45
45
  "tslib": "*"
46
46
  },