-
-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Description
In the current implementation, the ExceptionlessErrorBoundary works really well for capturing UI-level errors in the components. However, one of the benefits of Error Boundaries in React is the ability to render a fallback component when there is a component-level error. In order to do that alongside the ExceptionlessErrorBoundary, you have to write code that looks like this:
ReactDOM.render(
<React.StrictMode>
<ErrorBoundary>
<ExceptionlessErrorBoundary>
<App />
</ExceptionlessErrorBoundary>
</ErrorBoundary>
</React.StrictMode>,
document.getElementById('root')
);Having to create your own Error Boundary class component just to render a fallback image feels tedious and repetitive. It would be nice if the ExceptionlessErrorBoundary took an optional component prop that could be used to render a fallback. Something like this:
ReactDOM.render(
<React.StrictMode>
<ExceptionlessErrorBoundary fallbackComponent={ErrorUI}>
<App />
</ExceptionlessErrorBoundary>
</React.StrictMode>,
document.getElementById('root')
);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels