@bugsnag/plugin-react-navigation-performance
v2.5.0
Published
BugSnag performance monitoring for @react-navigation/native
Downloads
175
Keywords
Readme
@bugsnag/plugin-react-navigation-performance
A React Navigation integration for BugSnag Performance.
Usage
import BugsnagPerformance from "@bugsnag/react-native-performance"
import BugsnagPluginReactNavigationNativePerformance from "@bugsnag/plugin-react-navigation-performance"
import { NavigationContainer } from "@react-navigation/native"
const navigationPlugin = new BugsnagPluginReactNavigationNativePerformance()
BugsnagPerformance.start({
apiKey: "my-api-key",
plugins: [navigationPlugin]
})
const BugsnagNavigationContainer = navigationPlugin.createNavigationContainer(NavigationContainer)
function App () {
return (
<BugsnagNavigationContainer>
<Stack.Navigator initialRouteName="Home">
<Stack.Screen name="Home" component={HomeScreen} />
<Stack.Screen name="Profile" component={ProfileScreen} />
</Stack.Navigator>
</BugsnagNavigationContainer>
)
}