@datadog/mobile-react-navigation 1.0.0-rc5 → 1.0.0-rc7

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.
Files changed (33) hide show
  1. package/lib/commonjs/index.js.map +1 -1
  2. package/lib/commonjs/rum/instrumentation/DdRumReactNavigationTracking.js +70 -51
  3. package/lib/commonjs/rum/instrumentation/DdRumReactNavigationTracking.js.map +1 -1
  4. package/lib/commonjs/rum/instrumentation/react-navigation.js +2 -0
  5. package/lib/commonjs/rum/instrumentation/react-navigation.js.map +1 -0
  6. package/lib/module/index.js.map +1 -1
  7. package/lib/module/rum/instrumentation/DdRumReactNavigationTracking.js +66 -52
  8. package/lib/module/rum/instrumentation/DdRumReactNavigationTracking.js.map +1 -1
  9. package/lib/module/rum/instrumentation/react-navigation.js +2 -0
  10. package/lib/module/rum/instrumentation/react-navigation.js.map +1 -0
  11. package/lib/typescript/core/src/DdSdkReactNative.d.ts +6 -6
  12. package/lib/typescript/core/src/DdSdkReactNativeConfiguration.d.ts +14 -3
  13. package/lib/typescript/core/src/InternalLog.d.ts +5 -0
  14. package/lib/typescript/core/src/TimeProvider.d.ts +20 -0
  15. package/lib/typescript/core/src/Timer.d.ts +3 -2
  16. package/lib/typescript/core/src/index.d.ts +4 -3
  17. package/lib/typescript/core/src/rum/instrumentation/DdEventsInterceptor.d.ts +1 -0
  18. package/lib/typescript/core/src/rum/instrumentation/DdRumErrorTracking.d.ts +2 -2
  19. package/lib/typescript/core/src/rum/instrumentation/DdRumResourceTracking.d.ts +10 -9
  20. package/lib/typescript/core/src/rum/instrumentation/DdRumUserInteractionTracking.d.ts +3 -3
  21. package/lib/typescript/core/src/rum/instrumentation/DdRumXhr.d.ts +13 -3
  22. package/lib/typescript/core/src/rum/instrumentation/ShallowObjectEqualityChecker.d.ts +4 -0
  23. package/lib/typescript/core/src/version.d.ts +1 -1
  24. package/lib/typescript/react-navigation/src/rum/instrumentation/DdRumReactNavigationTracking.d.ts +8 -3
  25. package/lib/typescript/react-navigation/src/rum/instrumentation/react-navigation.d.ts +116 -0
  26. package/package.json +11 -6
  27. package/src/__tests__/rum/instrumentation/DdRumReactNavigationTracking.test.tsx +467 -384
  28. package/src/__tests__/rum/instrumentation/__utils__/AppStateMock.ts +56 -0
  29. package/src/__tests__/rum/instrumentation/__utils__/Navigators/NavigatorsV5.tsx +105 -0
  30. package/src/__tests__/rum/instrumentation/__utils__/Navigators/NavigatorsV6.tsx +105 -0
  31. package/src/index.tsx +4 -1
  32. package/src/rum/instrumentation/DdRumReactNavigationTracking.tsx +136 -64
  33. package/src/rum/instrumentation/react-navigation.ts +158 -0
@@ -0,0 +1,56 @@
1
+ /*
2
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
3
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
4
+ * Copyright 2016-Present Datadog, Inc.
5
+ */
6
+
7
+ import type { AppStateEvent, AppStateStatus } from 'react-native';
8
+
9
+ type handler = (type: AppStateStatus) => void;
10
+
11
+ export class AppStateMock {
12
+ private handlers: { [eventType: string]: handler[] } = {};
13
+
14
+ addEventListener = (type: AppStateEvent, callback: handler) => {
15
+ if (!this.handlers[type]) {
16
+ this.handlers[type] = [];
17
+ }
18
+ this.handlers[type].push(callback);
19
+ };
20
+
21
+ removeEventListener = (type: string, callback: handler) => {
22
+ if (!this.handlers[type]) {
23
+ return;
24
+ }
25
+ const callbackIndex = this.handlers[type].indexOf(callback);
26
+ if (callbackIndex === -1) {
27
+ return;
28
+ }
29
+ this.handlers[type] = [
30
+ ...this.handlers[type].slice(0, callbackIndex),
31
+ ...this.handlers[type].slice(
32
+ callbackIndex + 1,
33
+ this.handlers[type].length
34
+ )
35
+ ];
36
+ };
37
+
38
+ changeValue = (value: AppStateStatus) => {
39
+ if (!this.handlers.change) {
40
+ return;
41
+ }
42
+ this.handlers.change.forEach(callback => {
43
+ try {
44
+ callback(value);
45
+ } catch (e) {
46
+ console.warn(
47
+ `Failure while executing callback for value ${value}`
48
+ );
49
+ }
50
+ });
51
+ };
52
+
53
+ removeAllListeners = () => {
54
+ this.handlers = {};
55
+ };
56
+ }
@@ -0,0 +1,105 @@
1
+ /*
2
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
3
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
4
+ * Copyright 2016-Present Datadog, Inc.
5
+ */
6
+
7
+ import type { NavigationContainerRef } from '@react-navigation/native-v5';
8
+ import { NavigationContainer } from '@react-navigation/native-v5';
9
+ import { createStackNavigator } from '@react-navigation/stack-v5';
10
+ import { View, Text, Button } from 'react-native';
11
+ import React from 'react';
12
+
13
+ const { Screen, Navigator } = createStackNavigator();
14
+
15
+ export function FakeAboutScreen({ navigation }) {
16
+ return (
17
+ <View>
18
+ <Text>Welcome to About</Text>
19
+ </View>
20
+ );
21
+ }
22
+
23
+ export function FakeHomeScreen({ navigation }) {
24
+ return (
25
+ <View>
26
+ <Text>Welcome to Home</Text>
27
+ <Button
28
+ title="Go to About"
29
+ onPress={() => {
30
+ navigation.navigate('About');
31
+ }}
32
+ />
33
+ </View>
34
+ );
35
+ }
36
+
37
+ export function FakeSettingsScreen({ navigation }) {
38
+ return (
39
+ <View>
40
+ <Text>Welcome to Settings</Text>
41
+ <Button
42
+ title="Go to Nested Home"
43
+ onPress={() => {
44
+ navigation.navigate('NestedStack');
45
+ }}
46
+ />
47
+ </View>
48
+ );
49
+ }
50
+
51
+ export function FakeProfileScreen({ navigation }) {
52
+ return (
53
+ <Navigator>
54
+ <Screen name="Home" component={FakeHomeScreen} />
55
+ <Screen name="About" component={FakeSettingsScreen} />
56
+ </Navigator>
57
+ );
58
+ }
59
+
60
+ export function FakeNestedStack({ navigation }) {
61
+ return (
62
+ <Navigator>
63
+ <Screen name="NestedHome" component={FakeHomeScreen} />
64
+ </Navigator>
65
+ );
66
+ }
67
+
68
+ export function FakeNavigator1(props: {
69
+ navigationRef: React.RefObject<NavigationContainerRef>;
70
+ }) {
71
+ return (
72
+ <NavigationContainer ref={props.navigationRef}>
73
+ <Navigator>
74
+ <Screen name="Home" component={FakeHomeScreen} />
75
+ <Screen name="About" component={FakeAboutScreen} />
76
+ </Navigator>
77
+ </NavigationContainer>
78
+ );
79
+ }
80
+
81
+ export function FakeNavigator2(props: {
82
+ navigationRef: React.RefObject<NavigationContainerRef>;
83
+ }) {
84
+ return (
85
+ <NavigationContainer ref={props.navigationRef}>
86
+ <Navigator>
87
+ <Screen name="Home" component={FakeHomeScreen} />
88
+ <Screen name="About" component={FakeAboutScreen} />
89
+ </Navigator>
90
+ </NavigationContainer>
91
+ );
92
+ }
93
+
94
+ export function FakeNestedNavigator(props: {
95
+ navigationRef: React.RefObject<NavigationContainerRef>;
96
+ }) {
97
+ return (
98
+ <NavigationContainer ref={props.navigationRef}>
99
+ <Navigator>
100
+ <Screen name="Profile" component={FakeProfileScreen} />
101
+ <Screen name="NestedStack" component={FakeNestedStack} />
102
+ </Navigator>
103
+ </NavigationContainer>
104
+ );
105
+ }
@@ -0,0 +1,105 @@
1
+ /*
2
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
3
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
4
+ * Copyright 2016-Present Datadog, Inc.
5
+ */
6
+
7
+ import type { NavigationContainerRef } from '@react-navigation/native-v6';
8
+ import { NavigationContainer } from '@react-navigation/native-v6';
9
+ import { createStackNavigator } from '@react-navigation/stack-v6';
10
+ import { View, Text, Button } from 'react-native';
11
+ import React from 'react';
12
+
13
+ const { Screen, Navigator } = createStackNavigator();
14
+
15
+ export function FakeAboutScreen({ navigation }) {
16
+ return (
17
+ <View>
18
+ <Text>Welcome to About</Text>
19
+ </View>
20
+ );
21
+ }
22
+
23
+ export function FakeHomeScreen({ navigation }) {
24
+ return (
25
+ <View>
26
+ <Text>Welcome to Home</Text>
27
+ <Button
28
+ title="Go to About"
29
+ onPress={() => {
30
+ navigation.navigate('About');
31
+ }}
32
+ />
33
+ </View>
34
+ );
35
+ }
36
+
37
+ export function FakeSettingsScreen({ navigation }) {
38
+ return (
39
+ <View>
40
+ <Text>Welcome to Settings</Text>
41
+ <Button
42
+ title="Go to Nested Home"
43
+ onPress={() => {
44
+ navigation.navigate('NestedStack');
45
+ }}
46
+ />
47
+ </View>
48
+ );
49
+ }
50
+
51
+ export function FakeProfileScreen({ navigation }) {
52
+ return (
53
+ <Navigator>
54
+ <Screen name="Home" component={FakeHomeScreen} />
55
+ <Screen name="About" component={FakeSettingsScreen} />
56
+ </Navigator>
57
+ );
58
+ }
59
+
60
+ export function FakeNestedStack({ navigation }) {
61
+ return (
62
+ <Navigator>
63
+ <Screen name="NestedHome" component={FakeHomeScreen} />
64
+ </Navigator>
65
+ );
66
+ }
67
+
68
+ export function FakeNavigator1(props: {
69
+ navigationRef: React.RefObject<NavigationContainerRef<unknown>>;
70
+ }) {
71
+ return (
72
+ <NavigationContainer ref={props.navigationRef}>
73
+ <Navigator>
74
+ <Screen name="Home" component={FakeHomeScreen} />
75
+ <Screen name="About" component={FakeAboutScreen} />
76
+ </Navigator>
77
+ </NavigationContainer>
78
+ );
79
+ }
80
+
81
+ export function FakeNavigator2(props: {
82
+ navigationRef: React.RefObject<NavigationContainerRef<unknown>>;
83
+ }) {
84
+ return (
85
+ <NavigationContainer ref={props.navigationRef}>
86
+ <Navigator>
87
+ <Screen name="Home" component={FakeHomeScreen} />
88
+ <Screen name="About" component={FakeAboutScreen} />
89
+ </Navigator>
90
+ </NavigationContainer>
91
+ );
92
+ }
93
+
94
+ export function FakeNestedNavigator(props: {
95
+ navigationRef: React.RefObject<NavigationContainerRef<unknown>>;
96
+ }) {
97
+ return (
98
+ <NavigationContainer ref={props.navigationRef}>
99
+ <Navigator>
100
+ <Screen name="Profile" component={FakeProfileScreen} />
101
+ <Screen name="NestedStack" component={FakeNestedStack} />
102
+ </Navigator>
103
+ </NavigationContainer>
104
+ );
105
+ }
package/src/index.tsx CHANGED
@@ -4,6 +4,9 @@
4
4
  * Copyright 2016-Present Datadog, Inc.
5
5
  */
6
6
 
7
- import { DdRumReactNavigationTracking, ViewNamePredicate } from './rum/instrumentation/DdRumReactNavigationTracking';
7
+ import {
8
+ DdRumReactNavigationTracking,
9
+ ViewNamePredicate
10
+ } from './rum/instrumentation/DdRumReactNavigationTracking';
8
11
 
9
12
  export { DdRumReactNavigationTracking, ViewNamePredicate };
@@ -4,82 +4,156 @@
4
4
  * Copyright 2016-Present Datadog, Inc.
5
5
  */
6
6
 
7
- import type { EventArg, NavigationContainerRef, Route } from "@react-navigation/native";
8
- import { DdRum } from '@datadog/mobile-react-native';
9
- import { AppState, AppStateStatus } from 'react-native';
7
+ import { DdRum, SdkVerbosity, InternalLog } from '@datadog/mobile-react-native';
8
+ import type { AppStateStatus, NativeEventSubscription } from 'react-native';
9
+ import { AppState, BackHandler } from 'react-native';
10
10
 
11
- declare type NavigationListener = (event: EventArg<string, boolean, any>) => void | null
11
+ import type {
12
+ NavigationContainerRef,
13
+ Route,
14
+ NavigationListener
15
+ } from './react-navigation';
12
16
 
13
- // AppStateStatus can have values:
17
+ // AppStateStatus can have values:
14
18
  // 'active' - The app is running in the foreground
15
19
  // 'background' - The app is running in the background. The user is either in another app or on the home screen
16
20
  // 'inactive' [iOS] - This is a transition state that currently never happens for typical React Native apps.
17
21
  // 'unknown' [iOS] - Initial value until the current app state is determined
18
22
  // 'extension' [iOS] - The app is running as an app extension
19
- declare type AppStateListener = (appStateStatus: AppStateStatus) => void | null
23
+ declare type AppStateListener = (appStateStatus: AppStateStatus) => void | null;
20
24
 
21
- export type ViewNamePredicate = (route: Route<string, any | undefined>, trackedName: string) => string
25
+ export type ViewNamePredicate = (
26
+ route: Route<string, any | undefined>,
27
+ trackedName: string
28
+ ) => string;
22
29
 
23
30
  /**
24
31
  * Provides RUM integration for the [ReactNavigation](https://reactnavigation.org/) API.
25
32
  */
26
33
  export class DdRumReactNavigationTracking {
27
-
28
34
  private static registeredContainer: NavigationContainerRef | null;
29
-
30
- private static navigationStateChangeListener: NavigationListener;
31
35
 
32
- private static appStateListener: AppStateListener;
36
+ private static navigationStateChangeListener: NavigationListener;
33
37
 
34
38
  private static viewNamePredicate: ViewNamePredicate;
35
39
 
40
+ private static backHandler: NativeEventSubscription | null;
41
+
42
+ static ROUTE_UNDEFINED_NAVIGATION_WARNING_MESSAGE =
43
+ 'A navigation change was detected but the RUM ViewEvent was dropped as the route was undefined.';
44
+ static NULL_NAVIGATION_REF_ERROR_MESSAGE =
45
+ 'Cannot track views with a null navigationRef.';
46
+ static NAVIGATION_REF_IN_USE_ERROR_MESSAGE =
47
+ 'Cannot track new navigation container while another one is still tracked. Please call `DdRumReactNavigationTracking.stopTrackingViews` on the previous container reference.';
48
+
49
+ static isAppExitingOnBackPress = (): boolean => {
50
+ if (DdRumReactNavigationTracking.registeredContainer === null) {
51
+ return false;
52
+ }
53
+ if (DdRumReactNavigationTracking.registeredContainer.canGoBack()) {
54
+ return false;
55
+ }
56
+ return true;
57
+ };
58
+
59
+ static onBackPress = () => {
60
+ if (DdRumReactNavigationTracking.isAppExitingOnBackPress()) {
61
+ DdRumReactNavigationTracking.stopTrackingViews(
62
+ DdRumReactNavigationTracking.registeredContainer
63
+ );
64
+ }
65
+ // We always return false so we make sure the react-navigation callback is called.
66
+ // See https://reactnative.dev/docs/backhandler
67
+ return false;
68
+ };
69
+
36
70
  /**
37
71
  * Starts tracking the NavigationContainer and sends a RUM View event every time the navigation route changed.
38
72
  * @param navigationRef the reference to the real NavigationContainer.
39
73
  */
40
74
  static startTrackingViews(
41
- navigationRef: NavigationContainerRef | null,
42
- viewNamePredicate: ViewNamePredicate = function (_route: Route<string, any | undefined>, trackedName: string) { return trackedName; }
43
- ): void {
44
-
75
+ navigationRef: NavigationContainerRef | null,
76
+ viewNamePredicate: ViewNamePredicate = function (
77
+ _route: Route<string, any | undefined>,
78
+ trackedName: string
79
+ ) {
80
+ return trackedName;
81
+ }
82
+ ): void {
45
83
  if (navigationRef == null) {
46
- console.log ("Cannot track views with a null navigationRef");
84
+ InternalLog.log(
85
+ DdRumReactNavigationTracking.NULL_NAVIGATION_REF_ERROR_MESSAGE,
86
+ SdkVerbosity.ERROR
87
+ );
47
88
  return;
48
89
  }
49
90
 
50
- if (DdRumReactNavigationTracking.registeredContainer != null && this.registeredContainer !== navigationRef) {
51
- console.error('Cannot track new navigation container while another one is still tracked');
91
+ if (
92
+ DdRumReactNavigationTracking.registeredContainer != null &&
93
+ this.registeredContainer !== navigationRef
94
+ ) {
95
+ InternalLog.log(
96
+ DdRumReactNavigationTracking.NAVIGATION_REF_IN_USE_ERROR_MESSAGE,
97
+ SdkVerbosity.ERROR
98
+ );
52
99
  } else if (DdRumReactNavigationTracking.registeredContainer == null) {
53
100
  DdRumReactNavigationTracking.viewNamePredicate = viewNamePredicate;
54
101
  const listener = DdRumReactNavigationTracking.resolveNavigationStateChangeListener();
55
- DdRumReactNavigationTracking.handleRouteNavigation(navigationRef.getCurrentRoute());
56
- navigationRef.addListener("state", listener);
102
+ DdRumReactNavigationTracking.handleRouteNavigation(
103
+ navigationRef.getCurrentRoute()
104
+ );
105
+ navigationRef.addListener('state', listener);
57
106
  DdRumReactNavigationTracking.registeredContainer = navigationRef;
107
+ DdRumReactNavigationTracking.backHandler = BackHandler.addEventListener(
108
+ 'hardwareBackPress',
109
+ DdRumReactNavigationTracking.onBackPress
110
+ );
111
+ AppState.addEventListener(
112
+ 'change',
113
+ DdRumReactNavigationTracking.appStateListener
114
+ );
58
115
  }
59
-
60
-
61
- DdRumReactNavigationTracking.registerAppStateListenerIfNeeded();
62
116
  }
63
117
 
64
118
  /**
65
119
  * Stops tracking the NavigationContainer.
66
120
  * @param navigationRef the reference to the real NavigationContainer.
67
121
  */
68
- static stopTrackingViews(navigationRef: NavigationContainerRef | null): void {
122
+ static stopTrackingViews(
123
+ navigationRef: NavigationContainerRef | null
124
+ ): void {
69
125
  if (navigationRef != null) {
70
- navigationRef.removeListener("state", DdRumReactNavigationTracking.navigationStateChangeListener);
126
+ navigationRef.removeListener(
127
+ 'state',
128
+ DdRumReactNavigationTracking.navigationStateChangeListener
129
+ );
130
+ DdRumReactNavigationTracking.backHandler?.remove();
131
+ DdRumReactNavigationTracking.backHandler = null;
71
132
  DdRumReactNavigationTracking.registeredContainer = null;
72
- DdRumReactNavigationTracking.viewNamePredicate = function (_route: Route<string, any | undefined>, trackedName: string) { return trackedName; }
133
+ DdRumReactNavigationTracking.viewNamePredicate = function (
134
+ _route: Route<string, any | undefined>,
135
+ trackedName: string
136
+ ) {
137
+ return trackedName;
138
+ };
73
139
  }
140
+ AppState.removeEventListener(
141
+ 'change',
142
+ DdRumReactNavigationTracking.appStateListener
143
+ );
74
144
  }
75
145
 
76
146
  private static handleRouteNavigation(
77
- route: Route<string, any | undefined> | undefined,
147
+ route: Route<string, any | undefined> | undefined,
78
148
  appStateStatus: AppStateStatus | undefined = undefined
79
- ) {
80
- if (route == undefined || route == null) {
149
+ ) {
150
+ if (route === undefined || route === null) {
151
+ InternalLog.log(
152
+ DdRumReactNavigationTracking.ROUTE_UNDEFINED_NAVIGATION_WARNING_MESSAGE,
153
+ SdkVerbosity.WARN
154
+ );
81
155
  // RUMM-1400 in some cases the route seem to be undefined
82
- return
156
+ return;
83
157
  }
84
158
  const key = route.key;
85
159
 
@@ -89,8 +163,11 @@ export class DdRumReactNavigationTracking {
89
163
  if (key != null && screenName != null) {
90
164
  if (appStateStatus === 'background') {
91
165
  DdRum.stopView(key);
92
- } else if (appStateStatus === 'active' || appStateStatus == undefined) {
93
- // case when app goes into foreground,
166
+ } else if (
167
+ appStateStatus === 'active' ||
168
+ appStateStatus === undefined
169
+ ) {
170
+ // case when app goes into foreground,
94
171
  // in that case navigation listener won't be called
95
172
  DdRum.startView(key, screenName);
96
173
  }
@@ -98,22 +175,18 @@ export class DdRumReactNavigationTracking {
98
175
  }
99
176
 
100
177
  private static resolveNavigationStateChangeListener(): NavigationListener {
101
- if (DdRumReactNavigationTracking.navigationStateChangeListener == null) {
102
- DdRumReactNavigationTracking.navigationStateChangeListener = (event: EventArg<string, boolean, any>) => {
103
- let route = event.data?.state?.routes[event.data?.state?.index];
104
-
105
- if (route == undefined) {
106
- // RUMM-1400 in some cases the route seem to be undefined
107
- return
108
- }
109
-
110
- while (route.state != undefined) {
111
- const nestedRoute = route.state.routes[route.state.index];
112
- if (nestedRoute == undefined) {
113
- // RUMM-1400 in some cases the route seem to be undefined
114
- break;
115
- }
116
- route = nestedRoute
178
+ if (
179
+ DdRumReactNavigationTracking.navigationStateChangeListener == null
180
+ ) {
181
+ DdRumReactNavigationTracking.navigationStateChangeListener = () => {
182
+ const route = DdRumReactNavigationTracking.registeredContainer?.getCurrentRoute();
183
+
184
+ if (route === undefined) {
185
+ InternalLog.log(
186
+ DdRumReactNavigationTracking.ROUTE_UNDEFINED_NAVIGATION_WARNING_MESSAGE,
187
+ SdkVerbosity.WARN
188
+ );
189
+ return;
117
190
  }
118
191
 
119
192
  DdRumReactNavigationTracking.handleRouteNavigation(route);
@@ -122,22 +195,21 @@ export class DdRumReactNavigationTracking {
122
195
  return DdRumReactNavigationTracking.navigationStateChangeListener;
123
196
  }
124
197
 
125
- private static registerAppStateListenerIfNeeded() {
126
- if (DdRumReactNavigationTracking.appStateListener == null) {
127
- DdRumReactNavigationTracking.appStateListener = (appStateStatus: AppStateStatus) => {
128
-
129
- const currentRoute = DdRumReactNavigationTracking.registeredContainer?.getCurrentRoute();
130
- if (currentRoute == undefined) {
131
- return;
132
- }
133
-
134
- DdRumReactNavigationTracking.handleRouteNavigation(currentRoute, appStateStatus);
135
- };
136
-
137
- // AppState is singleton, so we should add a listener only once in the app lifetime
138
- AppState.addEventListener("change", DdRumReactNavigationTracking.appStateListener);
198
+ private static appStateListener: AppStateListener = (
199
+ appStateStatus: AppStateStatus
200
+ ) => {
201
+ const currentRoute = DdRumReactNavigationTracking.registeredContainer?.getCurrentRoute();
202
+ if (currentRoute === undefined || currentRoute === null) {
203
+ InternalLog.log(
204
+ `We could not determine the route when changing the application state to: ${appStateStatus}. No RUM View event will be sent in this case.`,
205
+ SdkVerbosity.ERROR
206
+ );
207
+ return;
139
208
  }
140
- }
141
209
 
210
+ DdRumReactNavigationTracking.handleRouteNavigation(
211
+ currentRoute,
212
+ appStateStatus
213
+ );
214
+ };
142
215
  }
143
-