Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable react native warning message at the bottom

Tags:

react-native

I'm working on a react-native IOS app, and this app sometimes will raise a Warning message "setState(...) Can only update a mounted or mounting component. ...", I understand what the message is about, it is caused by the long time AJAX call.

Considering this warning will not cause any serious issue for the APP, I don't want to spend much time to fix it at this moment, this warning message will show up in both simulator and cellphone while loading from development server. My question is whether the warning message will still prompt in product mode (Load from pre-bundled file)? If it will still show up, how to disable this Warning message from configuration?

Thanks.

like image 876
mailme365 Avatar asked Mar 05 '16 10:03

mailme365


People also ask

How do I get rid of the warning message in react native?

The Yellow warning box in React Native can be both helpful and annoying. There are many errors that can be ignored but end up blocking necessary pieces of the application. To disable the yellow box place console. disableYellowBox = true; anywhere in your application.

What is log box in react native?

LogBox, a Completely Redesigned Logging Experience React Native 0.63 launched LogBox as the default logging experience instead of RedBox and YellowBox. LogBox focuses on three main aspects: Concise, Formatted, and Actionable logs.


1 Answers

the better solution is to write this in your index file:

console.disableYellowBox = true;
like image 66
Fareed Alnamrouti Avatar answered Oct 13 '22 04:10

Fareed Alnamrouti