@opensrp/error-boundary-fallback
v0.0.7
Published
Error boundry fallback
Downloads
21
Readme
Error Boundary Fallback
This package provides a fallback component which you can use as an error boundary fallback.
Installation
yarn add @opensrp/error-boundary-fallback
Usage
error-boundary-fallback
makes use of the following options
- homeUrl:(string)
- required
- URL to redirect after clicking on back to home button
Code example
import App from '..';
import * as Sentry from '@sentry/react';
import { ErrorBoundaryFallback } from '@opensrp/error-boundary-fallback';
ReactDOM.render(
<Sentry.ErrorBoundary fallback={() => <ErrorBoundaryFallback homeUrl={'/home'} />}>
<App />
</Sentry.ErrorBoundary>,
document.getElementById('root')
);