@atlaskit/analytics-next
Version:
React components, HOCs and hooks to assist with tracking user activity with React components
26 lines (25 loc) • 862 B
TypeScript
import React, { Component, type ReactNode } from 'react';
type AnalyticsErrorBoundaryErrorInfo = {
componentStack: string;
};
export interface AnalyticsErrorBoundaryProps {
channel: string;
/** React component to be wrapped */
children: ReactNode;
data: {};
ErrorComponent?: React.ComponentType;
onError?: (error: Error, info?: AnalyticsErrorBoundaryErrorInfo) => void;
}
type AnalyticsErrorBoundaryState = {
hasError: boolean;
};
/**
* @private https://product-fabric.atlassian.net/browse/AFO-815
* @deprecated
*/
export default class AnalyticsErrorBoundary extends Component<AnalyticsErrorBoundaryProps, AnalyticsErrorBoundaryState> {
constructor(props: AnalyticsErrorBoundaryProps);
componentDidCatch(error: Error, info: AnalyticsErrorBoundaryErrorInfo): void;
render(): React.JSX.Element | null;
}
export {};