DEV Community

Domingos Manuel Capitango
Domingos Manuel Capitango

Posted on

Setting a timer for a long period of time, i.e. multiple minutes, is a performance and correctness issue on Android...

I also had this bug, I was investigating, and then I came up with the solution that using expo will not solve, however, it can be hidden.

Write this code snippet in the scope of your component, after the imports:

LogBox.ignoreLogs(["Setting a timer"]);
const _console = _.clone(console);
console.warn = (message: string) => {
if (message.indexOf("Setting a timer") <= -1) {
_console.warn(message);
}
};

Top comments (0)