facebookexperimental/Recoil

[React Native] "Setting a timer for a long period of time" warning

Open

#1 030 ouverte le 16 mai 2021

Voir sur GitHub
 (8 commentaires) (32 réactions) (0 assignés)JavaScript (19 428 stars) (1 151 forks)batch import
help wantednative

Description

Version 0.3.0 produces warning:

 WARN  Setting a timer for a long period of time, i.e. multiple minutes, is a performance and correctness issue on Android as it keeps the timer module awake, and timers can only be called when the app is in the foreground. See https://github.com/facebook/react-native/issues/12981 for more info.

Happens because of https://github.com/facebookexperimental/Recoil/blob/master/src/hooks/Recoil_Hooks.js#L60.

Any plans to fix it?

Guide contributeur