react-native-exception-handler
react-native-exception-handler copied to clipboard
the Component will unmount method
Hello ,
I initiated this package in index.js as per given steps.
I testes this.test() in app.js file , the output we are getting in error object is right , but when i created component folder added one button.js inside component .
I used this.test() inside button.js file , not getting proper error object , it's always saying "Component will unmount method " and is fatal getting undefined .
Can you please help me ?
I am not really sure if I get this right. Can you please give a link to a sample repo with the issue ?
Hey master-(atul),
Thanks for your quick response.
Could you please let me know how I can capture error from nested components?
E.g. App -> Header -> Navigation If I have above hierarchy of component and there is an reference error in Navigation component. Then how library will capture that error?
"Uncaught Errors" are bubbled up. So setting an error handler on the root should catch them even if errors come from sub components.
But if you are catching these errors by means of a try catch or componentDidCatch etc, then those are no longer "Uncaught errors" and wont be picked up by the global error handler.
This is the expected behaviour of the module. I am not really sure if that is what you were expecting?
Thank you so much for your help ..
I am sharing my sample to you .. I have initialized react-native-exception-handler package in index.js , In home.js i used {this.test()} function...
For login you can used any id or password like - [email protected] & 1234 password.
https://github.com/rahuljain88/React-Exception-Handling-Test
Thanks again
i have the same problem, how to solve it? can't got the right error and have the red error background
I saw this as well - and I believe this is due to warnings becoming red box errors. Not sure yet how to solve it.