Class: ErrorBoundary

ErrorBoundary()

Usage: 1) Wrap components to "try/catch" with: import { ErrorBoundary } from 'oskari-ui/util'; .. the usual JSX ... 2) (optional) Create custom error handler to show when error happens on wrapped components: export const CustomError = ({info}) => { console.log(info); return (BOOM!); }; 3) (optional) Pass custom error element for customizing the error display: import {CustomError} from './CustomError'; 4) See more: - https://reactjs.org/docs/error-boundaries.html