feat(components): add ErrorBoundary

This commit is contained in:
AAGaming
2024-06-27 00:06:00 -04:00
parent 58e3d35e1e
commit dcdbb2d6c7
3 changed files with 11 additions and 0 deletions

View File

@@ -85,5 +85,9 @@
"style": "module",
"parser": "typescript"
}
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"tag": "latest"
}
}

View File

@@ -0,0 +1,6 @@
import { Component, PropsWithChildren } from "react";
import { findModuleExport } from "../webpack";
export const ErrorBoundary = findModuleExport(
(e) => e.InstallErrorReportingStore && e?.prototype?.Reset && e?.prototype?.componentDidCatch,
) as Component<PropsWithChildren>;

View File

@@ -5,6 +5,7 @@ export * from './ControlsList';
export * from './Dialog';
export * from './DialogCheckbox';
export * from './Dropdown';
export * from './ErrorBoundary';
export * from './Field';
export * from './Focusable';
export * from './FocusRing';