React Native error tracking installation
Install the PostHog React Native library and its dependencies: PostHog is most easily used via the Once installed, PostHog will automatically start capturing events. You can also manually send events using the This configuration is client-side only. Support for remote configuration in the error tracking settings will be added in a future release. You can autocapture exceptions by configuring the Configuration options: You can manually capture exceptions using the This is helpful if you've built your own error handling logic or want to capture exceptions that are handled by your application code. We currently don't support the following features: These features will be added in future releases. We recommend you stay up to date with the latest version of the PostHog React Native SDK.Install the package
RequiredConfigure PostHog
RequiredPostHogProvider component. Wrap your app with the provider:Send events
RecommendedusePostHog hook:Set up exception autocapture
RecommendederrorTracking when setting up PostHog:Option Description uncaughtExceptionsCaptures Uncaught exceptions ( ReactNativeGlobal.ErrorUtils.setGlobalHandler)unhandledRejectionsCaptures Unhandled rejections ( ReactNativeGlobal.onunhandledrejection)consoleCaptures console logs as errors according to the reported LogLevelManually capture exceptions
OptionalcaptureException method:Future features
Optional

