Yellow warning messages are most popular among react native developers. Each time when we use react native and dose use inbuilt methods then if we accidentally forget to use some necessary arguments then it will show us a yellow warning message box to add or enable that particular argument. The yellow warning message box dose not effect the current application state or programming but it will effect the user application view. Because no developer or user wants to see any error message on application screen. So in this tutorial we would React Native Disable Remove All Yellow Warning Messages Box in Android iOS App.
Contents in this project React Native Disable Remove All Yellow Warning Messages Box in Android iOS App:
1. Below is the sample screenshot of react native app screen with multiple yellow box warning messages.
2. To Disable the Yellow Warning Message box we have to add below line in our code after declaring react native components.
1
|
console.disableYellowBox = true;
|
3. See the below code after adding above code.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import React, { Component } from “react”;
import { View, Image, Text } from “react-native”;
console.disableYellowBox = true;
export default class App extends Component {
render() {
return (
<View>
{/* Write Your Component Code here*/}
</View>
);
}
}
|
Screenshot after disabling yellow warning message box: