2.4.4 • Published 8 months ago

@datadog/mobile-react-navigation v2.4.4

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months ago

React-Native Monitoring for react-navigation components

Datadog Real User Monitoring (RUM) enables you to visualize and analyze the real-time performance and user journeys of your application’s individual users. This specific package adds support to the react-navigation library.

Setup

Note: This package is an integration for react-navigation library, please make sure you first install and setup the core mobile-react-native SDK.

To install with NPM, run:

npm install @datadog/mobile-react-navigation

To install with Yarn, run:

yarn add @datadog/mobile-react-navigation

Track view navigation

To track changes in navigation as RUM Views, set the onReady callback of your NavigationContainer component as follow. You can use the optional ViewNamePredicate parameter to replace the automatically detected View name with something more relevant to your use case.

Returning null in the ViewNamePredicate prevents the new RUM View from being created. The previous RUM View remains active.

import * as React from 'react';
import { DdRumReactNavigationTracking, ViewNamePredicate } from '@datadog/mobile-react-navigation';
import { Route } from "@react-navigation/native";

const viewNamePredicate: ViewNamePredicate = function customViewNamePredicate(route: Route<string, any | undefined>, trackedName: string) {
  return "My custom View Name"
}

function App() {
  const navigationRef = React.useRef(null);
  return (
    <View>
      <NavigationContainer ref={navigationRef} onReady={() => {
        DdRumReactNavigationTracking.startTrackingViews(navigationRef.current, viewNamePredicate)
      }}>
        // …
      </NavigationContainer>
    </View>
  );
}

Note: Only one NavigationContainer can be tracked at the time. If you need to track another container, stop tracking the previous one first, using DdRumReactNavigationTracking.stopTrackingViews().

2.4.4

8 months ago

2.4.1

11 months ago

2.4.0

11 months ago

2.4.3

11 months ago

2.4.2

11 months ago

2.3.4

1 year ago

2.3.6

12 months ago

2.3.5

1 year ago

2.3.3

1 year ago

2.3.2

1 year ago

2.3.1

1 year ago

2.3.0

1 year ago

2.2.0

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.4

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.0-rc.0

2 years ago

1.8.2

2 years ago

1.9.0

2 years ago

1.8.1

2 years ago

1.8.0

2 years ago

1.8.0-rc1

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.8.5

2 years ago

1.8.4

2 years ago

1.8.3

2 years ago

1.8.0-rc0

2 years ago

1.7.1

2 years ago

1.7.0

2 years ago

1.5.2

2 years ago

1.6.0

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.2.0

2 years ago

1.2.0-beta2

2 years ago

1.4.0

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.1

2 years ago

1.1.5

3 years ago

1.2.0-beta1

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

1.0.0-rc9

3 years ago

1.0.0-rc8

3 years ago

1.0.0-rc6

3 years ago

1.0.0-rc7

3 years ago

1.0.0-rc5

3 years ago

1.0.0-rc4

4 years ago

1.0.0-rc3

4 years ago

1.0.0-rc2

4 years ago

1.0.0-rc1

4 years ago

1.0.0-beta4

4 years ago