Setting a timer for a long period of time, i.e. multiple minutes

前端 未结 14 1254
面向向阳花
面向向阳花 2020-12-02 12:23

I want to use firebase auth with react native for Login and Signup but I got a yellow error:

Setting a timer for a long p

14条回答
  •  Happy的楠姐
    2020-12-02 12:28

    I think the most close-aide solution to this problem (until RN fixed this internally) is the solution mentioned here.

    // add this code to your project to reset all timeouts
    const highestTimeoutId = setTimeout(() => ';');
    for (let i = 0; i < highestTimeoutId; i++) {
        clearTimeout(i); 
    }
    

    Being used that - against Firebase call I still receive one yellow box warning (on settimeout), but any concurrent warnings never come thereafter. I'm not sure calling this at which point may not trigger the only warning also, but not any concurrent warning throws anymore after Firebase's async calls.

提交回复
热议问题