/** * @flow * @file withErrorBoundary HOC which adds error boundaries as well as error logging * @author Box */ import * as React from 'react'; import DefaultError from './DefaultError'; import ErrorBoundary from './ErrorBoundary'; import type { ElementOrigin } from '../flowTypes'; const withErrorBoundary = (errorOrigin: ElementOrigin, errorComponent: React.ComponentType = DefaultError) => ( WrappedComponent: React.ComponentType, ) => React.forwardRef>((props: Object, ref: React.Ref) => ( )); export default withErrorBoundary;