import * as Sentry from "@sentry/react-native";
import { NavigationContainer } from "@react-navigation/native";
const navigationIntegration = Sentry.reactNavigationIntegration({
enableTimeToInitialDisplay: true,
});
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [navigationIntegration],
})
function App = () => {
const containerRef = React.useRef();
return (
<NavigationContainer
ref={containerRef}
onReady={() => {
navigationIntegration.registerNavigationContainer(containerRef);
}}>
</NavigationContainer>
);
};
import * as Sentry from "@sentry/react-native";
import { NavigationContainer } from "@react-navigation/native";
const navigationIntegration = Sentry.reactNavigationIntegration({
enableTimeToInitialDisplay: true,
});
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [navigationIntegration],
})
class App extends React.Component {
containerRef = React.createRef();
render() {
return (
<NavigationContainer
ref={this.containerRef}
onReady={() => {
navigationIntegration.registerNavigationContainer(this.containerRef);
}}>
</NavigationContainer>
);
}
}