React.js Error Boundary
@highlight-run/react which can be installed alongside
highlight.run for additional functionality for React applications.
Highlight provides an
ErrorBoundary to help you provide a better experience for your users when your application crashes. Using an
ErrorBoundary gives your application an opportunity to recover from a bad state.
Showing the feedback modal when a crash happens
Showing a custom feedback modal when a crash happens
You should use this if you would like to replace the feedback modal with your own styles/branding.
Using the ErrorBoundary with react-router
If you're using react-router, you may have error raised by your route loaders
that can be handled with the highlight error boundary.
To set this up, you'll need to pass your
<Route> or your
ErrorBoundary prop pointing to a component that extracts the react router error from
A fallback component that gets rendered when the error boundary encounters an error.
Enables Highlight's crash report. When the
ErrorBoundary is triggered, a form will be prompted to the user asking them for optional feedback. Defaults to true.
The strings used for the Highlight crash report.
Allows you to attach additional user information to the feedback report. If you've called
H.identify() in your application before, you won't have to set this, Highlight will infer the user's identity.
The title for the report dialog.
The subtitle for the report dialog.
The secondary subtitle for the report dialog.
The label for the name field.
The label for the email field.
The label for the verbatim field.
The label for the close button.
The label for the submit button.
The label for the success message shown after the crash report is submitted.
Whether to show the Highlight branding attribution in the report dialog.
Default value is