How do you hide the warnings in React Native iOS simulator?

According to React Native Documentation, you can hide warning messages by setting disableYellowBox to true like this:

console.disableYellowBox = true;

Update: React Native 0.63+

console.disableYellowBox is removed and now you can use:

import { LogBox } from 'react-native';
LogBox.ignoreLogs(['Warning: ...']); // Ignore log notification by message
LogBox.ignoreAllLogs();//Ignore all log notifications

to ignore all log notifications

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)