@bugsnag/plugin-react

React integration for @bugsnag/js

Usage no npm install needed!

<script type="module">
  import bugsnagPluginReact from 'https://cdn.skypack.dev/@bugsnag/plugin-react';
</script>

README

@bugsnag/plugin-react

Documentation NPM

NPM

A @bugsnag/js plugin for React. Learn more about error reporting for React applications with Bugsnag.

This package enables you to integrate Bugsnag's error reporting with React's error boundaries. It creates and configures an <ErrorBoundary/> component which will capture and report unhandled errors in your component tree. You either use the <ErrorBoundary/> directly, or extend it to provide some fallback UI for your users.

Reported errors will contain useful debugging info from Reacts's internals such as the component name where the error originated, and the component stack.

Getting started

  1. Create a Bugsnag account
  2. Complete the instructions in the integration guide
  3. Report handled exceptions using Bugsnag.notify()
  4. Customize your integration using the configuration options

Support

License

This package is free software released under the MIT License. See LICENSE.txt for details.