react-native-exception-handler
react-native-exception-handler copied to clipboard
Returning a component from the error handler
Hi there, this is a neat project! I discovered it from this post: https://elazizi.com/handling-errors-in-react-native-a-complete-guide.
I have one question: Is it possible to return a component from the errorHandler
? Something like the following:
const errorHandler = (error, isFatal) => {
if (isFatal) {
return <FallbackComponent />;
} else {
console.log(error);
}
};
setJSExceptionHandler(errorHandler, true);
export default function App() {
// ...