@berlitz/error-boundary

ErrorBoundary component for the Max Design System

Usage no npm install needed!

<script type="module">
  import berlitzErrorBoundary from 'https://cdn.skypack.dev/@berlitz/error-boundary';
</script>

README

ErrorBoundary npm version

Catches uncaught errors in any child component and renders a nice warning message.

Installation

yarn add @berlitz/error-boundary

Props

Argument Type Required Default Example
title String No
summary String No
buttonLabel String No

Usage

import ErrorBoundary from '@berlitz/error-boundary'

const MyApp = () => (
  <ErrorBoundary>
    <MyComponentThatThrowsErrors summary="Call our customer service team on 1800 123 123" />
  </ErrorBoundary>
)