carloscuesta/react-native-error-boundary

Native errors

Closed this issue · 7 comments

Doe it work with native errors?

@pavermakov

No, this component catches JavaScript errors. As stated in the react-native docs

Error boundaries are React components that catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI instead of the component tree that crashed.

@carloscuesta Can you add that to the documentation? It's not clear from looking at your npm notes or this repo that the package will not support native errors.

I think to be more specific, it only catch errors thrown in render function. It does not handle javascript errors throw elsewhere, like a callback or code out side of react's scope.

@zhigang1992 According to the docs

anywhere in their child component tree.

That excludes everything which is not part of the component tree

Is there an alternative to handle native errors? Or is the only solution to handle them one by one?

Is there an alternative to handle native errors? Or is the only solution to handle them one by one?

If you're using expo, expo has

https://docs.expo.io/guides/errors/

https://docs.expo.io/versions/latest/sdk/error-recovery/