Closed polluterofminds closed 3 years ago
We could do this, but my counter argument is if you want to remove Exceptionless, now you have to create the error boundary anyways and redo the ui instead of removing two lines of code. I kinda like being transparent and single responsibility (of just capturing the errors, not doing many things), thoughts?
Yeah, that's a fair argument. I don't have a super strong opinion. I just felt like it was tedious when I was setting this up and it seemed like a nice (optional) bonus for people to have.
Let's close this until it's requested by a few end users. If you are reading this and like this upvote and leave a comment :).
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:
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: