DEV Community


Posted on

How to hide the yellow box on React Native

Sometime , the yellow box warning is very annoying . The lock part of the UI so somehow we can interact to our app. Ok . Here I will show you a quick way to hide it .

Remember , some yellow box is helpful to show potential error , so you should never hide it all , only hide those happen regularly and you already know about it ( like some happen only on dev mode ... etc )

On terminal

Yellow box

Ok here is how to hide it

On the App.js ( or actually any js , ts file . but better on the root file )

import { LogBox } from "react-native";
LogBox.ignoreLogs(["Firebase Analytics is not available in the Expo client"]);
Enter fullscreen mode Exit fullscreen mode

Here as you can see . I hide the yellow box for Firebase Analytics only . But you can use this for hide all (not recommended)

Enter fullscreen mode Exit fullscreen mode

Top comments (0)