![JAR search and dependency download from the Maven repository](/logo.png)
core.error.withErrorBoundary.tsx Maven / Gradle / Ivy
import React, { ComponentClass, FunctionComponentFactory } from 'react'
import { ErrorBoundary } from './Boundary'
export const withErrorBoundary = <
TProps extends object,
>(Component: ComponentClass | (FunctionComponentFactory & { displayName?: string })) => {
function WithErrorBoundary(props: TProps) {
return (
)
}
WithErrorBoundary.displayName = `WithErrorBoundary: ${Component.displayName || ''}`
return WithErrorBoundary
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy