remove yellow warning react native emulator
console.disableYellowBox = true;
//add it anywhere in any page to disable warnings in emulator
remove yellow warning react native emulator
console.disableYellowBox = true;
//add it anywhere in any page to disable warnings in emulator
react native disable warnings
// for RN >= 0.63
// in your entry file (eg. App.tsx)
import { LogBox } from 'react-native';
// ignore warnings that start in a string that matchs any of
// the ones in the array
LogBox.ignoreLogs(["Require cycle:"])
react native ignore warnings
UPDATE RN V0.63 ABOVE
YellowBox is now changed and replace with LogBox
FUNCTIONAL
import React, { useEffect } from 'react';
import { LogBox } from 'react-native';
useEffect(() => {
LogBox.ignoreLogs(['VirtualizedLists should never be nested']);
}, [])
CLASS BASED
import React from 'react';
import { LogBox } from 'react-native';
componentDidMount() {
LogBox.ignoreLogs(['VirtualizedLists should never be nested']);
}
UPDATE RN V0.63 BELOW
FUNCTIONAL
import React, { useEffect } from 'react';
import { YellowBox } from 'react-native';
useEffect(() => {
YellowBox.ignoreWarnings(['VirtualizedLists should never be nested']);
}, [])
CLASS BASED
import React from 'react';
import { YellowBox } from 'react-native';
componentDidMount() {
YellowBox.ignoreWarnings(['VirtualizedLists should never be nested']);
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us