An overlay for displaying stack frames and error messages in React development environments.
—
Quality
Pending
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Functions for clearing and dismissing errors from the React Error Overlay interface.
Clears all currently displayed runtime errors from the overlay.
/**
* Dismisses all currently displayed runtime errors from the overlay
* Clears the error list and hides the overlay if no build errors remain
*/
function dismissRuntimeErrors(): void;Usage Examples:
import {
dismissRuntimeErrors,
reportRuntimeError
} from "react-error-overlay";
// Report some errors
reportRuntimeError(new Error('First error'));
reportRuntimeError(new Error('Second error'));
// Later, clear all runtime errors
dismissRuntimeErrors();
// Overlay will be hidden if no build errors are presentClears the currently displayed build/compilation error from the overlay.
/**
* Dismisses the currently displayed build error from the overlay
* Clears the build error and hides the overlay if no runtime errors remain
*/
function dismissBuildError(): void;Usage Examples:
import {
dismissBuildError,
reportBuildError
} from "react-error-overlay";
// Report a build error
reportBuildError(`
TypeScript error in /src/App.tsx(10,5):
Property 'foo' does not exist on type 'Props'.
`);
// Later, clear the build error (e.g., after fixing the issue)
dismissBuildError();
// Overlay will be hidden if no runtime errors are presentBoth dismissal functions work independently, allowing selective clearing of different error types:
import {
reportBuildError,
reportRuntimeError,
dismissBuildError,
dismissRuntimeErrors
} from "react-error-overlay";
// Report both types of errors
reportBuildError('Build failed: Missing semicolon');
reportRuntimeError(new Error('Runtime error occurred'));
// Clear only runtime errors (build error remains)
dismissRuntimeErrors();
// Clear only build error (runtime errors remain)
dismissBuildError();Errors are automatically dismissed in certain scenarios:
// Automatic dismissal example
reportBuildError('First build error');
// Overlay shows first error
reportBuildError('Second build error');
// First error automatically dismissed, second error shown
dismissBuildError();
// Overlay completely hidden if no runtime errors existInstall with Tessl CLI
npx tessl i tessl/npm-react-error-overlay