DEV Community

loading...

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

aliendev66 profile image Domingos Capitango ・1 min read

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);
}
};

Discussion (0)

pic
Editor guide