-
At first I didn't make any error handling, when something occurs, the app stucks. I found |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I probably recommend using |
Beta Was this translation helpful? Give feedback.
I probably recommend using
ErrorBoundary
if it fits your use case since it handles unmounting of children. It usesonError
internally but the benefit ofErrorBoundary
is it ensures children are all resolved up to that point. WithonError
it is possible for children contexts to get passed out of the creator upwards and escape it.onError
is the lower level primitive and is ok generally higher up in the render tree for logging things butErrorBoundary
is more suited for managing the view. I mostly provideonError
in case someone wishes to implement their ownErrorBoundary
different than I have created.