import React, { useState } from 'react' import { ErrorBoundary } from 'app/components' const ComponentWithError = () => { throw Error('component error') /* eslint-disable-next-line no-unreachable */ return
} const Demo = () => { const [ isShowErrorComponent, setErrorComponentVisibility ] = useState(false) return <>

{ setErrorComponentVisibility(true) } }> click to render buggy component wrapped in ErrorBoundary

Error is not handling in dev mode. You should press close on error screen to observe the result

{ isShowErrorComponent && } } Demo.coreSrcDirName = 'ErrorBoundary' export default Demo