WebView

Learn how to set up the Sentry React Native and Browser SDKs with React Native WebView.

To monitor errors and performance in web views of React Native applications, you need to set up Sentry SDKs in both the mobile application and the web projects running in the web views.

The Sentry React Native SDK doesn't interact with the mobile application's web views. To monitor errors and performance in the React Native part of the application follow the Sentry React Native SDK setup instructions.

To monitor errors and performance in web views choose the appropriate Sentry JavaScript SDK depending on the framework used in the web project.

  • The JavaScript SDK should be initialized when the web view is created and will be closed when the web view is closed. To monitor all web views in the application, initialize the JavaScript SDK every time a web view is created.

  • If the web project is accessed remotely and not unique to the mobile application (for example the project also works as a standalone web application), we recommend using separate Sentry projects for the mobile application and the web project.

Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").