Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-error-overlay

Package Overview
Dependencies
Maintainers
5
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-error-overlay

An overlay for displaying stack frames.

  • 6.0.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.9M
decreased by-18.09%
Maintainers
5
Weekly downloads
 
Created

What is react-error-overlay?

The react-error-overlay package is used to display an overlay in your React application during development that shows runtime errors, including stack traces. It is commonly included in development environments like Create React App to improve the developer experience by providing clear and immediate feedback on errors that occur during development.

What are react-error-overlay's main functionalities?

Displaying runtime errors in an overlay

This feature allows developers to display a full-screen overlay in their React application when a runtime error occurs. The overlay includes the error message, stack trace, and the file where the error occurred.

import { reportRuntimeError } from 'react-error-overlay';

reportRuntimeError(new Error('This is a runtime error'));

Customizing the overlay

Developers can customize the behavior of the overlay, such as setting a custom handler to open the source file in an editor when an error location is clicked.

import { setEditorHandler } from 'react-error-overlay';

setEditorHandler(function editorHandler(errorLocation) {
  // Custom logic to open the source file in an editor
});

Dismissing the overlay

This feature allows developers to programmatically dismiss the error overlay, which can be useful for handling errors gracefully or when implementing custom error recovery logic.

import { dismissRuntimeErrors } from 'react-error-overlay';

dismissRuntimeErrors();

Other packages similar to react-error-overlay

Keywords

FAQs

Package last updated on 21 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc