FaasJS
Home
  • Guide
  • Documents
  • Templates
  • Changelog
  • Ecosystem

    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security
Home
  • Guide
  • Documents
  • Templates
  • Changelog
  • Ecosystem

    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security

Documents / @faasjs/ant-design / ErrorBoundary

Function: ErrorBoundary()

ErrorBoundary(props): Element

Styled error boundary.

When errorChildren is not provided, the fallback UI renders an Ant Design Alert containing the captured error message and description.

Parameters

props

ErrorBoundaryProps

Error boundary props forwarded to the underlying React implementation.

Returns

Element

Example

import { ErrorBoundary } from '@faasjs/ant-design'

export function Page() {
  return (
    <ErrorBoundary>
      <DangerousWidget />
    </ErrorBoundary>
  )
}